Pyright: Some variables are not renamed in "Rename Symbol" functionality.

Created on 26 Aug 2019  Â·  3Comments  Â·  Source: microsoft/pyright

Describe the bug
Some variables are not renamed in "Rename Symbol" functionality.

Screenshots or Code
スクリーンショット 2019-08-26 11 27 21

スクリーンショット 2019-08-26 11 27 27

Expected behavior
cnt += 1
After rename symbol
count += 1

VS Code extension or command-line
VS Code 1.37.1
Pyright 1.0.57

addressed in next version bug

Most helpful comment

This bug is now fixed in 1.0.58, which I just published.

All 3 comments

Additional context

Using find all references functionality shows the same result as the issue description
image

But it's correct if triggered from this cursor location:
image

I think it's might be related to the behavior of += operator.

codes:

def rename_test():
    cnt = 1
    while True:
        cnt += 1
        if cnt > 5:
            break

Thanks for the bug report. This will be fixed in the next release.

This bug is now fixed in 1.0.58, which I just published.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BjMrq picture BjMrq  Â·  3Comments

tamuhey picture tamuhey  Â·  3Comments

Afsarsoft picture Afsarsoft  Â·  3Comments

mmicu picture mmicu  Â·  3Comments

tamuhey picture tamuhey  Â·  3Comments