fix: track swift's SwiftElement.py -> Elements.py rename - #624
Open
petercorke wants to merge 1 commit into
Open
Conversation
swift renamed src/swift/SwiftElement.py -> Elements.py (avoids a module/class name collision that was confusing mypy -- the file and the SwiftElement class inside it shared a name, and the class is re-exported at swift's package top level) -- jhavl/swift#141. roboticstoolbox/backends/swift/__init__.py imported directly from the submodule path (from swift.SwiftElement import ...) rather than from the swift package's own top-level re-exports, so it needs the same one-line fix to keep working once that rename ships in a released swift-sim version. Verified by loading this file standalone (importlib) against a swift checkout with the rename already applied -- resolves Swift, Slider, SwiftElement etc. correctly from swift.Elements.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #624 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 142 142
Lines 13898 13898
=====================================
Misses 13898 13898 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/swift/SwiftElement.py->Elements.py, to avoid a module/class name collision that was confusing mypy (the file and theSwiftElementclass inside it shared a name, and the class is re-exported at swift's package top level) -- see jhavl/swift#141.roboticstoolbox/backends/swift/__init__.pyimports directly from the submodule path (from swift.SwiftElement import ...) rather than from swift's own top-level re-exports, so it needs the matching one-line fix to keep working once that rename ships in a releasedswift-simversion.Test plan
backends/swift/__init__.pystandalone (viaimportlib) against a local swift checkout with the rename already applied -- resolvesSwift,Slider,SwiftElement, etc. correctly fromswift.Elements