Reconfigured AbstractApplication to inherit from abc.ABC#74
Open
Reconfigured AbstractApplication to inherit from abc.ABC#74
AbstractApplication to inherit from abc.ABC#74Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #74 +/- ##
=======================================
Coverage 95.54% 95.55%
=======================================
Files 19 19
Lines 2381 2386 +5
=======================================
+ Hits 2275 2280 +5
Misses 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AbstractApplication to use abc.ABCAbstractApplication to inherit from abc.ABC
juanesarango
approved these changes
May 6, 2025
Contributor
There was a problem hiding this comment.
Great! Thanks for the contribution fixing this @tobsecret!
Allow me to run a couple of tests on our apps using this branch, before merging it.
Contributor
Author
|
@juanesarango sure thing! Thanks for the pairing session today! |
|
Looks good to me 👍 Thanks for working on this team! |
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.
Canonically
@abc.abstractmethodis used to designate methods that are mandatory for subclasses to implement - otherwise those classes fail at instantiation. This behavior is only active if the class inherits fromabc.ABCor analogons.However,
@abc.abstractmethodcan also be used to simply add the__isabstractmethod__property to a class or instance method which is how it was used inAbstractApplication.I have reconfigured the
AbstractApplicationto inherit fromabc.ABCand have replaced the logic that@abc.abstractmethodwas used for previously withis_implemented.There is some discussion to be had about the exact implementation of
is_implemented. Currently it is hardcoded to check whether a method of specificallyAbstractApplicationwas overridden, as opposed to the base class of the instanceself.__class__.__bases__[0].