-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rule request: abstractmethod appears on normal class #12861
Comments
@AlexWaygood any thoughts on this? |
I think this is a good idea for a rule. I agree that if a class that doesn't have
|
in fact the @abc.abstractmethod docs says
|
the case where an abstractmethod decorator is used on a class that does not subclass
abc.ABC
uses theABC
metaclass, is probably a bug. It would be great to have a rule to detect the obvious case where it is used on the wrong type of class (when all ancestors of the class in the same file for instance).If there is a rule that already implements this, let me know. :)
Here is a real example from PyTorch:
The text was updated successfully, but these errors were encountered: