1

Resolved

Code analysis doesn't understand + and +=

description

Consider:
xs = (1, True)
xs += ('Foo',)
Hovering over xs will show the type as "tuple of {int, bool}" in the Quick Info tooltip, but will ignore the string literal.

Same thing happens when using + or += with list and set literals. On the other hand, using append() with lists does correctly extend their type with the type of the argument.

comments