aliases from other modules are incorrectly marked as deprecated when `deprecateTypingAliases` is enabled if the alias has the same name as a deprecated alias
DetachHead opened this issue · comments
DetachHead commented
from collections.abc import Set as AbstractSet
def foo(a: AbstractSet[str]): # error: This type is deprecated as of Python 3.9; use "collections.abc.Set" instead
pass
collections.abc.Set
is not deprecated, but it's incorrectly being treated as such because its alias has the same name as typing.AbstractSet
Eric Traut commented
This is addressed in pyright 1.1.363, which I just published.