| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…one file spatialmath/base/types.py dispatched on sys.version_info across _types_35.py, _types_39.py and _types_311.py, from when Python 3.5-3.10 support coexisted. pyproject.toml has required Python >=3.10 since rai-opensource#186, so _types_35.py could never be reached, and _types_39/_types_311 differed only in where Self is imported from. Collapse to a single file with a two-line version check; no change to the names or aliases it exports.
|
⚠️ Please install the Codecov Report❌ Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.
📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Step 1 of a broader type-hint cleanup pass (cc @jbarry-bdai — following on from our email thread on this). Opening this narrow, mechanical piece first to get it moving while the rest gets scoped out.
spatialmath/base/types.py dispatched on sys.version_info across three duplicate files (_types_35.py, _types_39.py, _types_311.py, ~465 lines total), from when Python 3.5-3.10 support coexisted. pyproject.toml has required >=3.10 since #186, so _types_35.py could never actually be reached, and _types_39/_types_311 differed only in where Self is imported from (typing_extensions vs typing). This collapses all three into a single ~170-line file with a two-line version check. No aliases or exported names changed — purely a dedup, verified by a full test suite pass (343 passed).
What's next
This is deliberately the smallest, lowest-risk slice. A quick survey of the rest of the package turned up the following, to be tackled in follow-up PRs:
Planned sequencing: this shim collapse, then a mechanical syntax-modernization pass, then filling the real coverage gaps (twist.py/spatialvector.py/pose2d.py first, then animate.py) as their own PR(s) since those need actual thought rather than find-replace.