Don't analyze call to attributes present in several members of union types

It prevents false positives in checking argument types and argument
lists. We may add multiple analyze call results for this case in the
future.
This commit is contained in:
Andrey Vlasovskikh
2014-10-16 19:24:11 +04:00
parent 6ec4f8954f
commit dfd32f7ec3
5 changed files with 51 additions and 44 deletions
@@ -0,0 +1,21 @@
class C1:
def foo(self, x):
return self
class C2:
def foo(self, x, y):
return self
def f():
"""
:rtype: C1 | C2
"""
pass
f().foo() # XXX: Ignore this false negative as for now
f().foo(1)
f().foo(1, 2)
f().foo(1, 2, 3) # XXX: Ignore this false negative as well