-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
bugUnexpected or incorrect user-visible behaviorUnexpected or incorrect user-visible behavior
Milestone
Description
Describe the bug
The * syntax in parameter list defines a keyword-only argument:
def foo(a, *, arg):Extract variable scope is incorrect when handling keywords-only arguments.
To Reproduce
Steps to reproduce the behavior:
- Code before refactoring:
def func(a, *, arg):
print(arg)-
Describe the refactoring you want to do: extract refactoring
-
Expected code after refactoring:
def func(a, *, arg):
extracted_method(arg)
def extracted_method(arg):
print(arg)- Describe the error or unexpected result that you are getting
def func(a, *, arg):
extracted_method()
def extracted_method():
print(arg)Editor information (please complete the following information):
- Project Python version: 3.10
- Rope Python version: 3.10
- Rope version: 1.5.1
Metadata
Metadata
Assignees
Labels
bugUnexpected or incorrect user-visible behaviorUnexpected or incorrect user-visible behavior