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. Module x.b: #pylint: disable=W0201 class Bar(object): def __init__(self, x): self.x = x Module x.a: 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 | |
priority | normal |
---|---|
type | bug |
done in | <not specified> |
closed by | <not specified> |
Comments
-
2012/12/31 12:49, written by vanish
add commentedited the bug report to get correct formatting.