Pylint: warn of redundant `pylint: disable` comments?

Question:

I created a class:

class Blahaj:
    def swim(self):
        ...

    # todo: consider other modes of transport

Pylint warned there were too few public methods, which I acknowledged by adding a # pylint: disable=too-few-public-methods comment.

Now I’ve added more methods, is there a way to get Pylint to warn me that the earlier comment is now redundant?

class Blahaj:  # pylint: disable=too-few-public-methods
    #          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ now redundant
    def swim(self):
        ...

    def jump(self):
        ...

    def fly(self):
        ...

    def ski(self):
        ...
Asked By: Jack Deeth

||

Answers:

Since you’ve manually disabled it, it won’t notify you about it anymore for that class. So to answer this, no. There is only your keen eye for re-evaluating disabled checks upon code change.

Answered By: KazzyJr
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.