logilab-astng #107441 E1101: infer_subscript: should work when __getitem__ is implemented [open]

The following code example illustrates that the return value type for the __getitem__() call is successfuly infered, however, the the return value type for the subscript call is not inferred (this is not implemented yet).

class A:
my_field = 3

class B:
def __getitem__(self, index):
return A()

b1 = B()
v = b1.__getitem__(0).non_existing_field # gives E1101: Instance of 'A' has no 'non_existing_field' member
v = b1[0].non_existing_field # subscript does not give E1101

appeared in<not specified>
done in<not specified>
closed by<not specified>