pylance-release
pylance-release copied to clipboard
Renaming in Jupyter notebooks only works in a single cell
Environment data
VS Code version: 1.71 OS version: Windows 11 22622.586 x64 Restricted Mode: No Python version: 3.8.10 Python extension: v2022.15.12441015 Pylance extension: v2022.8.51 Jupyter extension: v2022.9.1002461039
Code Snippet
tmp = 5
tmp = 6
tmp = 7
def foo():
pass
a = foo()
Repro Steps
- Create a ipynb file and save it.
- Try to rename the function or the variable.
- Create a ipynb file but don't save it.
- Try to rename the function or the variable.
Expected behavior
In any scenario, renaming works for all cells.
Actual behavior
In a saved ipynb file, renaming the function "foo" works for all cells, but renaming the variable "tmp" only works for a single cell.
In an unsaved ipynb file, renaming the function "foo" and the variable "tmp" both only works for a single cell.
Logs
For a saved file, tmp.ipynb.txt For an unsaved file, Untitled-1.ipynb.txt