I've got a Python application and because of a third-party library I have to use Python 2.7, but I'm trying to make the best of it.
I've downloaded PyLint 1.9.5 and I'm basically getting it to work. One thing I'm stumbling over and can't find a solution to.
I've got some classes basically like this:
class Narg(object):
[snip]
class Foo(object):
def __init__(self):
self.bar = None # type: Optional[list[Narg]]
def find(self):
if self.bar:
for narg in self.bar:
[snip]
pylint doesn't like this, it gives me
E:201,80: Non-iterable value self.bar is used in an iterating context (not-an-iterable)
The code runs fine, so it's actually good, how can I convince pylint of this?