File
sdks/python/pmxt/errors.py
Bare Built-in Types
- Line 119:
def from_server_error(error_data: dict) -> PmxtError: — parameter error_data uses bare dict with no key/value types
- Should be
error_data: Dict[str, Any]
Impact
from_server_error is the public factory function used to convert raw server error responses into typed PmxtError exceptions. It is called internally from client.py and is also importable by users who want to parse error payloads. Bare dict prevents static checkers from narrowing the structure of the argument.
Suggested Fix
def from_server_error(error_data: Dict[str, Any]) -> PmxtError:
Requires from typing import Dict, Any (check existing imports).
Found by automated Python type hints audit
File
sdks/python/pmxt/errors.pyBare Built-in Types
def from_server_error(error_data: dict) -> PmxtError:— parametererror_datauses baredictwith no key/value typeserror_data: Dict[str, Any]Impact
from_server_erroris the public factory function used to convert raw server error responses into typedPmxtErrorexceptions. It is called internally fromclient.pyand is also importable by users who want to parse error payloads. Baredictprevents static checkers from narrowing the structure of the argument.Suggested Fix
Requires
from typing import Dict, Any(check existing imports).Found by automated Python type hints audit