pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Renaming in Jupyter notebooks only works in a single cell

Open ted1030 opened this issue 2 years ago • 0 comments

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

  1. Create a ipynb file and save it.
  2. Try to rename the function or the variable.
  3. Create a ipynb file but don't save it.
  4. 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

ted1030 avatar Sep 03 '22 06:09 ted1030