pylance-release
pylance-release copied to clipboard
Rename fails to rename generic function's usages in other files/cells
Maybe I'm missing something, but with
v2024.10.1it doesn't work for me :( What am I missing here?
Originally posted by @drorata in #3061
This also repros in non-notebook scenarios where the generic function is imported. Usages in the declaring cell/file are renamed properly.
# test.py
from collections.abc import Sequence
def element[T: (int, str)](items: Sequence[T]) -> T:
return items[0]
# test2.py
from test import element
e_int = element(items=[1, 2, 3])
print(e_int)