我创建了一个类:
class Blahaj:
def swim(self):
...
# todo: consider other modes of transportPylint警告说,公共方法太少了,我通过添加# pylint: disable=too-few-public-methods评论来承认这一点。
现在我添加了更多的方法,是否有办法让Pylint警告我前面的评论现在是多余的?
class Blahaj: # pylint: disable=too-few-public-methods
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ now redundant
def swim(self):
...
def jump(self):
...
def fly(self):
...
def ski(self):
...发布于 2022-10-03 07:14:33
发布于 2022-10-02 19:24:37
因为您已经手动禁用了它,所以它不会再为该类通知您了。所以要回答这个问题,不行。只有您敏锐的目光重新评估禁用检查的代码更改。
https://stackoverflow.com/questions/73928644
复制相似问题