You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename and inline refactor did not recognize match-cases statements as variable assignment #861
The match statement allows pattern capture which effectively acts like an assignment statement. Currently they are not recognised as assignment statement that can define a variable.
To Reproduce
Steps to reproduce the behavior:
Code before refactoring:
x= [1, 2, 3]
matchx:
case [1, *_] asold_name_1:
print(old_name_1)
case [2, *old_name_2]:
print(old_name_2)
Describe the refactoring you want to do: rename old_name_xxx to new_name_xxx
Expected code after refactoring:
x= [1, 2, 3]
matchx:
case [1, *_] asnew_name_1:
print(new_name_1)
case [2, *new_name_2]:
print(new_name_2)
Describe the error or unexpected result that you are getting
RefactoringError: Rename refactoring should be performed on resolvable python identifiers
changed the title [-]Rename refactor did not recognize match statements as variable assignment[/-][+]Rename refactor did not recognize match-cases statements as variable assignment[/+]on Aug 20, 2026
changed the title [-]Rename refactor did not recognize match-cases statements as variable assignment[/-][+]Rename and inline refactor did not recognize match-cases statements as variable assignment[/+]on Aug 20, 2026
Activity
[-]Rename refactor did not recognize match statements as variable assignment[/-][+]Rename refactor did not recognize match-cases statements as variable assignment[/+][-]Rename refactor did not recognize match-cases statements as variable assignment[/-][+]Rename and inline refactor did not recognize match-cases statements as variable assignment[/+]