You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MessageBuilder.format_distinctly doesn't make identically named (but different) types distinct when one is generic #3860
dummy_plugin.py:8: error: Return type of "get_method_hook" incompatible with supertype "Plugin"
dummy_plugin.py:14: error: Incompatible return value type (got "Type", expected Type[Any])
It took a while of staring confusedly at my code to realise that the fix is quite simple:
Hmm, it looks like this is handled in the general case, I'm just hitting it because one of the types is generic (and so the string representations are different in the first comparison in MessageBuilder.format_distinctly).
changed the title [-]Conflicting names of types should be disambiguated[/-][+]MessageBuilder.format_distinctly doesn't make generic types distinct from non-generic types[/+]on Aug 22, 2017
changed the title [-]MessageBuilder.format_distinctly doesn't make generic types distinct from non-generic types[/-][+]MessageBuilder.format_distinctly doesn't make identically named (but different) types distinct when one is generic[/+]on Aug 22, 2017
Activity
OddBloke commentedon Aug 22, 2017
Hmm, it looks like this is handled in the general case, I'm just hitting it because one of the types is generic (and so the string representations are different in the first comparison in
MessageBuilder.format_distinctly).Let me update the issue title.
[-]Conflicting names of types should be disambiguated[/-][+]MessageBuilder.format_distinctly doesn't make generic types distinct from non-generic types[/+][-]MessageBuilder.format_distinctly doesn't make generic types distinct from non-generic types[/-][+]MessageBuilder.format_distinctly doesn't make identically named (but different) types distinct when one is generic[/+]OddBloke commentedon Aug 22, 2017
I started looking at this, but I think it'll be much easier after #3430 has landed.
gvanrossum commentedon Aug 22, 2017
Hm, maybe you can help with #3430? That PR seems to have ended up in a bit of quicksand...
OddBloke commentedon Aug 24, 2017
Yep, I'll definitely take a look.
ilevkivskyi commentedon Sep 2, 2017
I thin this one can be fixed now, since the PR superseding #3430 is now merged.
OddBloke commentedon Sep 2, 2017