You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, not sure if this is the correct place, please point me in the right direction if not.
I've recently re-watched a good talk on not writing too many classes and was wondering if it is possible to implement a few recommendations giver there as rules.
Empty class rule: warn when the class just subclasses another while not doing anything, e.g.:
classMyDict(dict):
pass
Class with two methods, one of which is __init__: warn when a class has only two methods, one of which is __init__, e.g.:
I did a quick search through existing rules, but couldn't find anything relevant.
The text was updated successfully, but these errors were encountered:
Rizhiy
changed the title
[New rules request] Empty class and Class with two methods one of which is init
[New rules request] Empty class and class with two methods, one of which is init
Jun 5, 2024
Hi, not sure if this is the correct place, please point me in the right direction if not.
I've recently re-watched a good talk on not writing too many classes and was wondering if it is possible to implement a few recommendations giver there as rules.
Empty class rule: warn when the class just subclasses another while not doing anything, e.g.:
Class with two methods, one of which is
__init__
: warn when a class has only two methods, one of which is__init__
, e.g.:I did a quick search through existing rules, but couldn't find anything relevant.
The text was updated successfully, but these errors were encountered: