pylint #115247 W0201 disabling not respected [open]
In the example code below, note that the last line could generate a W0201, but it shouldn't because W0201 is disabled. However, when is_message_enabled() is executed, it compares the line number of the bad statement (from module x.a) to the per-line message states of the x.b module. Since x.b has 5 lines and the bad statement is on line 15, the message is reported as being enabled.
#pylint: disable=W0201 class Bar(object): def __init__(self, x): self.x = x
from x.b import Bar #pylint: disable=W0201 # # These comments are important. # They ensure that the line numbers for class Foo # are greater than any line numbers for module x.b # class Foo(): def __init__(self, a): self.z = Bar(a) def bad(self): self.z.q = 3
|done in||<not specified>|
|closed by||<not specified>|