pylint-bot / test

0 stars 0 forks source link

False positives for unsupported-binary-operation #139

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

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


#!python

# The tuple is iterable, it should work
lines = []
lines += (1, 2, 3) 

Of course, the lack of understanding flow controls leads to spurious false positives for this situation as well.


pylint-bot commented 9 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?):


As an example of an error caused by the lack of understanding flow control:

#!python

 if isinstance(default, tuple):
       return default + (n, )
   else:
       return default + [n] # thinks its tuple