Type annot the internal symbol cache

symbol_search
Tyler Goodlet 2021-05-25 06:33:07 -04:00
parent 59475cfd81
commit 44f4fdf043
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ class Client:
'User-Agent': 'User-Agent':
'krakenex/2.1.0 (+https://github.com/veox/python3-krakenex)' 'krakenex/2.1.0 (+https://github.com/veox/python3-krakenex)'
}) })
self._pairs = None self._pairs: list[str] = []
@property @property
def pairs(self) -> Dict[str, Any]: def pairs(self) -> Dict[str, Any]:
@ -289,7 +289,7 @@ class Client:
async def get_client() -> Client: async def get_client() -> Client:
client = Client() client = Client()
# load all symbols locally for fast search # at startup, load all symbols locally for fast search
await client.cache_symbols() await client.cache_symbols()
yield client yield client