Remove unnecessary __super and __init__class__#187
Merged
AlexanderWells-diamond merged 2 commits intomasterfrom Apr 1, 2025
Merged
Remove unnecessary __super and __init__class__#187AlexanderWells-diamond merged 2 commits intomasterfrom
AlexanderWells-diamond merged 2 commits intomasterfrom
Conversation
Python3 fully supports use of super() without additional required parameters, unlike Python2. __init__class__ and the associated metaclass logic are no longer required as __init__subclass__ does exactly what we want; running once per subclass type.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #187 +/- ##
==========================================
- Coverage 88.30% 88.13% -0.17%
==========================================
Files 15 15
Lines 1274 1256 -18
==========================================
- Hits 1125 1107 -18
Misses 149 149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Araneidae
approved these changes
Mar 31, 2025
Comment on lines
-95
to
-99
| # Create an empty device directory. | ||
| # (Potentially this belongs in a mix-in for resolving the linkage | ||
| # between record and instances, but for now this is hard-wired here.) | ||
| cls.__device_directory = {} | ||
|
|
Collaborator
There was a problem hiding this comment.
Interesting: I can find no trace of this symbol anywhere else (even using git log -S)! I guess this was an idea that either never happened or has been erased.
Pointed out during code review.
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.
Python3 fully supports use of super() without additional required parameters, unlike Python2.
__init__class__and the associated metaclass logic are no longer required as__init__subclass__does exactly what we want; running once per subclass created.Fixes #167