Fixup symcache type annots; no more `Pair` type
parent
8989c73a93
commit
40c5d88a9b
|
@ -31,6 +31,8 @@ from pathlib import Path
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
from typing import (
|
from typing import (
|
||||||
Any,
|
Any,
|
||||||
|
Sequence,
|
||||||
|
Hashable,
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
)
|
)
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
|
@ -128,8 +130,8 @@ class SymbologyCache(Struct):
|
||||||
- `.get_mkt_pairs()`: returning a table of pair-`Struct`
|
- `.get_mkt_pairs()`: returning a table of pair-`Struct`
|
||||||
types, custom defined by the particular backend.
|
types, custom defined by the particular backend.
|
||||||
|
|
||||||
AND, the required `.get_mkt_info()` module-level endpoint which
|
AND, the required `.get_mkt_info()` module-level endpoint
|
||||||
maps `fqme: str` -> `MktPair`s.
|
which maps `fqme: str` -> `MktPair`s.
|
||||||
|
|
||||||
These tables are then used to fill out the `.assets`, `.pairs` and
|
These tables are then used to fill out the `.assets`, `.pairs` and
|
||||||
`.mktmaps` tables on this cache instance, respectively.
|
`.mktmaps` tables on this cache instance, respectively.
|
||||||
|
@ -500,7 +502,7 @@ def match_from_pairs(
|
||||||
)
|
)
|
||||||
|
|
||||||
# pop and repack pairs in output dict
|
# pop and repack pairs in output dict
|
||||||
matched_pairs: dict[str, Pair] = {}
|
matched_pairs: dict[str, Struct] = {}
|
||||||
for item in matches:
|
for item in matches:
|
||||||
pair_key: str = item[0]
|
pair_key: str = item[0]
|
||||||
matched_pairs[pair_key] = pairs[pair_key]
|
matched_pairs[pair_key] = pairs[pair_key]
|
||||||
|
|
Loading…
Reference in New Issue