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
bug: AttributeError when using ValidationMonitorMixin #248
bug: AttributeError when using ValidationMonitorMixin #248
Conversation
…tead of relying on class constructor (that is never called). This commit will avoid that when we define a custom monitor without providing a default value for correct_field_list_handling attribute to raise an AttributeError.
Codecov Report
@@ Coverage Diff @@
## master #248 +/- ##
==========================================
+ Coverage 71.65% 71.70% +0.05%
==========================================
Files 67 67
Lines 2759 2757 -2
Branches 309 309
==========================================
Hits 1977 1977
+ Misses 718 716 -2
Partials 64 64
Continue to review full report at Codecov.
|
#246 sounds to me like a bad usage in the code using the mixin (defining |
Mixin |
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.
LGTM, just adding that, if it's a mixin, probably we shouldn't call super()
As of my understanding, it is not inheritance, but composition.
So, we should be using a mixin to compose something and avoid the coupling through inheritance
I’m not talking about using Whenever you inherit from a class, be it a mixin or something else, you are still inheriting from a class, and you must use This specific mixin can be modified not to use |
This PR fixes #246 .