-
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
Check for abstract base class definitions with no abstractmethods #273
Comments
I can't see how this could draw false positives ... so can do nothing but help. I feel this fits things bugbear looks for ... PR will be accepted. |
I'm starting on a PR now!
How about extending this to the body being anything but # @abstractmethod
def method(self):
"""my abstract method"""
pass Similar to pyright's check for |
Closed by #274. |
If you also want
you can open a separate issue for it, should be an easy one as well :) |
I'm easy - I was going to release a new version today - Should we wait for this? |
Nah, let's release what we've got now and let future features take care of themselves. (though Cooper, you might want to copy the auto release set up from flake8-async to make releases really easy in future?) |
I'm not a fan of that tbh as we don't have good enough change log enforcement etc. with this project so the 1 commit + release via GitHub is there enough for me imo. |
Suggested message:
{classname} is an abstract base class, but it has no abstract methods. Remember to use @abstractmethod, @abstractclassmethod, and/or @abstractproperty decorators.
We might also want to emit a warning for a probably-missing-decorator on any method of an ABC where the whole method body is
...
, even if there are some abstract-decorated methods on the class.The text was updated successfully, but these errors were encountered: