Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pylint: disabling R0921 does not work, still warning

Tags:

python

pylint

I have a class which has two methods that raise NotImplementedError and also inherits from an abstract class (a class that contains abstract methods, from the abc package. This parent class in turn inherits from a class marked as abstract through __metaclass__ = ABCMeta). Due to this a R0921 warning is raised when running pylint on my code. If I remove the NotImplementedErrors pylint does not give that warning. Now, I've tried disabling the R0921 for the class like this:

# pylint: disable=R0921
class Wrapper(AbstractWrapper):
    ...
    def func(self, kwargs**):
        raise NotImplementedError
    ...

But it does not seem to work. I still get the warning "Abstract class not referenced". What am I missing?

like image 615
Parham Avatar asked Oct 08 '22 04:10

Parham


1 Answers

This is a bug and has been reported, see the ticket at the pylint tracker http://www.logilab.org/ticket/111138

like image 199
Parham Avatar answered Oct 13 '22 10:10

Parham