-
Notifications
You must be signed in to change notification settings - Fork 6
Reconfigured AbstractApplication to inherit from abc.ABC
#74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
@juanesarango sure thing! Thanks for the pairing session today! |
|
Looks good to me 👍 Thanks for working on this team! |
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].