Pylint不断报告R: 73,0:MyLogging: Too many public methods (22/20)以下代码的error():
class MyLogging(logging.Logger):
def foo(self):
pass
def bar(self):
pass
Run Code Online (Sandbox Code Playgroud)
起初我认为这是Pylint中的一个错误,因为MyLogging类只有22行代码,但是我意识到,它包括了基类中的所有公共方法logging.Logger,这增加了20个统计数据.
您知道是否可以从Pylint统计中排除基类公共方法?
PS.我知道我可以更改max-public-methods为更高的数字,或者添加一次异常# pylint: disable=R0904