If I create a TypedDict and reference one of its keys somewhere, I expect that key to change when I rename it in the TypedDict definition.
Steps to reproduce:
from typing import TypedDict
class Foo(TypedDict):
bar: str
def myfunc(mydict: Foo):
print(mydict["bar"])
In the above, if I do F2 (rename symbol) and rename bar to baz, I would expect mydict["bar"] to become mydict["baz"] - but currently that is not the case.
Diagnostic data
Python version (& distribution if applicable, e.g. Anaconda): 3.11.6
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Type: Bug
Behaviour
Expected vs. Actual
If I create a TypedDict and reference one of its keys somewhere, I expect that key to change when I rename it in the TypedDict definition.
Steps to reproduce:
In the above, if I do F2 (rename symbol) and rename
bar
tobaz
, I would expectmydict["bar"]
to becomemydict["baz"]
- but currently that is not the case.Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)``` XXX ```
User Settings
``` venvPath: ""
languageServer: "Pylance"
linting
• enabled: false
• mypyPath: ""
• prospectorArgs: ""
formatting
• provider: "black"
testing
• cwd: ""
• pytestArgs: ""
• pytestEnabled: true
tensorBoard
• logDirectory: ""
```
Extension version: 2023.14.0 VS Code version: Cursor 0.22.2 (ecfbaf72d176819d122080bc0b8bcd76cc586e10, 2024-01-17T07:56:48.316Z) OS version: Linux x64 6.1.71-1-lts Modes:
System Info
|Item|Value| |---|---| |CPUs|AMD Ryzen 7 3700X 8-Core Processor (16 x 4148)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|2, 2, 2| |Memory (System)|31.29GB (6.87GB free)| |Process Argv|--no-sandbox| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|plasma-i3| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE-i3| |XDG_SESSION_TYPE|x11|