slotscheck
slotscheck copied to clipboard
More relaxed `require-subclass` option
Currently slotscheck has the require-subclass
option, which enforces the use of __slots__
wherever slotted classes are subclassed. However, this greatly depends on whether builtin/extension classes are considered "slotted". For example, object
has no __dict__
. Flagging all direct object
subclasses would essentially require slots for all classes in a module (that don't subclass from a non-slot class outside the module).