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
Type checkers that include the recent changes from #8977#9058 (e.g. pyright v1.1.281) now incorrectly emit an error like Member "register" is unknown for the following line of code:
Type checkers that do not include those changes (e.g. pyright v1.1.278) do not emit any error for that line, as expected.
Copy/pasted excerpt:
importtypingastfrom ._typingimportKT# a typevarclassBidictKeysView(t.KeysView[KT], t.ValuesView[KT]):
"""Since the keys of a bidict are the values of its inverse (and vice versa), the :class:`~collections.abc.ValuesView` result of calling *bi.values()* is also a :class:`~collections.abc.KeysView` of *bi.inverse*. """dict_keys: t.Type[t.KeysView[t.Any]] =type({}.keys())
BidictKeysView.register(dict_keys) # <-- false positive error emitted here
Please let me know if there is any other info I can provide. Thank you!