File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2323
2424import json
2525
26+ try :
27+ from typing import Any
28+ except ImportError :
29+ pass
30+
2631__version__ = "0.0.0+auto.0"
2732__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_FakeRequests.git"
2833
2934
3035class Fake_Requests :
3136 """For faking 'requests' using a local file instead of the network."""
3237
33- def __init__ (self , filename ) :
38+ def __init__ (self , filename : str ) -> None :
3439 self ._filename = filename
3540
36- def json (self ):
41+ def json (self ) -> Any :
3742 """json parsed version for local requests."""
3843 with open (self ._filename , "r" ) as file :
3944 return json .load (file )
4045
4146 @property
42- def text (self ):
47+ def text (self ) -> str :
4348 """raw text version for local requests."""
4449 with open (self ._filename , "r" ) as file :
4550 return file .read ()
You can’t perform that action at this time.
0 commit comments