rope
rope copied to clipboard
Incorrect inline refactoring with dictionary expansion
Describe the bug
Incorrect inline refactoring with dictionary expansion.
To Reproduce Steps to reproduce the behavior:
- Code before refactoring:
def main(arguments):
foobar(workspace, **arguments[0])
def foobar(workspace, document_uri, range):
return FooBarCls(workspace, document_uri, range)()
-
Inline "foobar"
-
Expected code after refactoring:
def main(arguments):
document_uri, range = arguments[0]
FooBarCls(workspace, document_uri, range)()
- Describe the error or unexpected result that you are getting
def main(arguments):
FooBarCls(workspace, document_uri, range)()
which is invalid since document_uri and range is not a valid name inside main.
Editor information:
- Project Python version: 3.9.5
- Rope Python version: 3.9.5
- Rope version: 0.20.1