-
-
Notifications
You must be signed in to change notification settings - Fork 225
Conversation
realfishsam
commented
Jun 11, 2026
Maintenance automation note: local validation passed for this focused Python typing cleanup:
python3 -m py_compile sdks/python/pmxt/errors.py sdks/python/pmxt/_exchanges.py✅python3 -m compileall -q sdks/python/pmxt✅
CI is currently blocked by repository-wide generated client/API reference drift. I checked the generators, but committing their output would include broad hosted-client/docs changes unrelated to this one-file constructor annotation PR, so I left the PR scoped.
realfishsam
commented
Jun 11, 2026
PR Review: PASS (NOT VERIFIED)
What This Does
Adds explicit -> None return annotations to remaining Python SDK error constructors. This is type-hygiene only and does not change runtime error mapping for SDK consumers.
Blast Radius
Python SDK error classes in sdks/python/pmxt/errors.py only.
Consumer Verification
Before (base branch):
Constructors such as OrderNotFound(order_id, exchange=None) and NetworkError(message, exchange=None) already initialized the same PMXT error codes and retryability flags, but lacked explicit return annotations.
After (PR branch):
The signatures now include -> None while preserving the same super().__init__ arguments and error codes. I verified changed Python syntax with python3 -m py_compile sdks/python/pmxt/errors.py.
Test Results
- Build: PASS (
npm run build --workspace=pmxt-core) - Core unit tests: PASS (27 suites / 652 tests passed; 1 suite / 3 tests skipped)
- Python syntax: PASS (
py_compileonerrors.py) - Full
npm test: FAIL in this checkout during Python SDK collection becausepmxt_internal/eth_accountare not available. - Server starts: N/A (type annotation only)
- E2E smoke: N/A (not observable through sidecar HTTP API)
Findings
No blocking findings.
PMXT Pipeline Check
- Field propagation (3-layer): N/A
- OpenAPI sync: N/A
- Financial precision: N/A
- Type safety: OK
- Auth safety: N/A
Semver Impact
patch -- Python type annotation cleanup only.
Risk
I could not run the Python SDK test suite end-to-end in this checkout because generated/internal Python dependencies are unavailable, but the changed constructors are mechanically annotation-only.
Summary
-> Nonereturn annotations to the remaining typed error constructors.Fixes #731
Test Plan
python3 -m py_compile sdks/python/pmxt/errors.py sdks/python/pmxt/_exchanges.pypython3 -m compileall -q sdks/python/pmxt