What makes pylint think my class is abstract?

前端 未结 2 704
情话喂你
情话喂你 2021-01-18 16:21

As I understand it, Python (2.5.2) does not have real support for abstract classes. Why is pylint complaining about this class being an \"Abstract class not reference?\" Wil

2条回答
  •  情歌与酒
    2021-01-18 16:52

    FWIW, raising NotImplementedError is enough to make pylint think this is an abstract class (which is absolutely correct). from logilab.org/card/pylintfeatures: W0223: Method %r is abstract in class %r but is not overridden Used when an abstract method (ie raise NotImplementedError) is not overridden in concrete class. – Tobiesque 2 hours ago

提交回复
热议问题