-
Notifications
You must be signed in to change notification settings - Fork 109
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
Multi-inheritance B024 #277
Comments
Yep, that's a false alarm. I think in this specific case you don't need to declare the metaclass though, since that should be inherited from |
This passes the flake8 tests, however my IDE (PyCharm) flags a warning that I'm not implementing the |
Hmm, I think Pycharm is also giving a false alarm there! Nonetheless, we've got something to fix too. I propose that B024 be disabled for child classes which inherit from anything but abc.ABC - it'll miss some warnings, but still cover the common cases. |
Yeah that sounds good, and also fixes #278 |
Hi,
The latest release introduced a new error code (B024) which checks that an abc defines abstract methods/properties. I have an abc,
A
, which has a__call__
abstract method.I also have a different abc,
RandomA
which sharesA
's methods (such aseq
) and abstract__call__
, but also has a random number generator as an instance variableThis way I can create child classes which have deterministic or random behaviour.
RandomA
now violates B024 as it doesn't define abstract methods, even though it should inheritA
's__call__
method right?The text was updated successfully, but these errors were encountered: