pylint icon indicating copy to clipboard operation
pylint copied to clipboard

The flow of the program is not taken in consideration for no-member and other checks

Open pylint-bot opened this issue 10 years ago • 0 comments

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)


Due to how pylint is implemented, by using the visitor pattern, the following code will not be detected as problematic, since when visit_getattr will be called, x will be unknown.

We should consider changing this for Pylint 2.0, where vising the nodes will consider the flow of the program. There's a big bunch of errors that are currently undetected due to this.


def test(x):
   return x.lala # not detected

test(1) 

  • Bitbucket: https://bitbucket.org/logilab/pylint/issue/623

pylint-bot avatar Aug 20 '15 15:08 pylint-bot