Inconsistency
watch_address in the Python SDK uses the bare list[str] generic (Python 3.9+ only) with a = None default. This is both a compatibility issue (breaks Python 3.8) and a type-correctness issue (list[str] does not include None, so the annotation is wrong for the given default).
Current (PMXT)
sdks/python/pmxt/client.py line ~2030:
def watch_address(self, address: str, types: list[str] = None):
Two problems:
list[str] as a generic requires Python ≥ 3.9; the rest of the SDK imports List from typing for 3.8 compatibility.
- The annotation
list[str] does not permit None, but the default is None. The correct annotation is Optional[List[str]].
Expected (CCXT convention)
CCXT Python uses typing.List and typing.Optional throughout for 3.8 compatibility. Consistent with the rest of sdks/python/pmxt/client.py and sdks/python/pmxt/models.py:
from typing import List, Optional
def watch_address(self, address: str, types: Optional[List[str]] = None):
Impact
Code using this method will fail to import or raise a TypeError on Python 3.8. Static type checkers (mypy) will flag the None default as incompatible with the list[str] annotation.
Found by automated PMXT ↔ CCXT API consistency audit
Inconsistency
watch_addressin the Python SDK uses the barelist[str]generic (Python 3.9+ only) with a= Nonedefault. This is both a compatibility issue (breaks Python 3.8) and a type-correctness issue (list[str]does not includeNone, so the annotation is wrong for the given default).Current (PMXT)
sdks/python/pmxt/client.pyline ~2030:Two problems:
list[str]as a generic requires Python ≥ 3.9; the rest of the SDK importsListfromtypingfor 3.8 compatibility.list[str]does not permitNone, but the default isNone. The correct annotation isOptional[List[str]].Expected (CCXT convention)
CCXT Python uses
typing.Listandtyping.Optionalthroughout for 3.8 compatibility. Consistent with the rest ofsdks/python/pmxt/client.pyandsdks/python/pmxt/models.py:Impact
Code using this method will fail to import or raise a
TypeErroron Python 3.8. Static type checkers (mypy) will flag theNonedefault as incompatible with thelist[str]annotation.Found by automated PMXT ↔ CCXT API consistency audit