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
Add B027: empty method in abstract base class with no abstract decorator #281
Add B027: empty method in abstract base class with no abstract decorator #281
Conversation
0937a2d
to
e8ec222
Compare
e8ec222
to
8462c1f
Compare
b01e327
to
a67a8c2
Compare
Updated PR to also fix #277 #280 and the original problem in #278 (but not #278 (comment)). |
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.
Two comments below; otherwise looks good!
a67a8c2
to
65c141e
Compare
fixed both comments 👍 |
5991c6a
to
cea0499
Compare
Fixing #293 as well now. |
Thanks again @jakkdl! |
EDIT: I read through the issues and realized that B024 needs changes, so made this a draft for now.
Implements the second suggested check in #273
There seems to be some difference in style on ellipsis vs pass, so one might want to restrict the check to only be if the body is docstring and ellipsis.
When reading the docs on abc I also found out that the abstract decorators inside it other than
@abstractmethod
are deprecated so I modified the b024 message to not suggest deprecated decorators.Modified the b024 test to not trigger b027
Fixes #277, fixes #278 (though see #290), and fixes #280.