Originally reported by: the mulhern (BitBucket: the_mulhern)
In the following code, the disable pragma is respected and no error is reported.
#!python
class Foo(object):
"""block-disable test"""
def meth3(self):
"""test one line disabling"""
print \
self.bla # pylint: disable=E1101
But in this code the disable pragma is not respected and the error is reported.
#!python
class Foo(object):
"""block-disable test"""
def meth3(self):
"""test one line disabling"""
print self.bla \
# pylint: disable=E1101
In the first case, the code is broken by the "\" but in the second the code is separated from the pragma by the slash. I believe that the pragma should be considered to be on the same line as the code in both cases, so neither should have an error.
_Original comment by_ Sylvain Th茅nault (BitBucket: sthenault, GitHub: @sthenault?):
Removing version: 1.1 (automated comment)
It would be nice to have this fixed. An alternative might be a pylint comment that applies only to the next line (so that you could put it right before the line in question).
An alternative might be a pylint comment that applies only to the next line (so that you could put it right before the line in question).
I'd love that! I often want a # pylint: disable=some-code-here comment but keep it under the 79 char limit, so I usually end up ignoring it for the whole function (at least I think that's what currently happens when you put such a comment on a line on its own).
Most helpful comment
It would be nice to have this fixed. An alternative might be a pylint comment that applies only to the next line (so that you could put it right before the line in question).