Pylint W0223: method ... abstract in the class ... but not overridden

Pylint generates this error for subclasses of an abstract class, even if these subclasses themselves are not created and methods are overridden in specific subclasses. Why does Pilint think my abstract subclasses are for the concrete? How can I plug this warning without pulling out the hammer and completely disabling it in the rc file?

+7
python pylint
source share
1 answer

For some reason, pylint thinks the class is not abstract (detection in the current situation is done by checking a method that raises NotImplementedError). Adding a comment such as #pylint: disable=W0223 at the top of the module (to disable only in this module) or class (only in this class) should do the trick.

+4
source share

All Articles