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
exception when refactoring method of class defined in function #692
Describe the bug
When using the ArgumentRemover-refactoring on a class defined not at the top level I am getting an AttributeNotFoundError from within the library
Describe the error or unexpected result that you are getting
...
File "C:\Users\username\rope_playground\refactor.py", line 83, in do_file
signature = change_signature.ChangeSignature(proj, resource, start+4)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\rope\refactor\change_signature.py", line 14, in __init__
self._set_name_and_pyname()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\rope\refactor\change_signature.py", line 42, in _set_name_and_pyname
self.others = (pyclass.get_name(), pyclass.parent[pyclass.get_name()])
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\rope\base\pyobjects.py", line 30, in __getitem__
return self.get_attribute(key)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\rope\base\pyobjects.py", line 218, in get_attribute
raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Inner not found
Editor information (please complete the following information):
Project Python version: 3.7.9
Rope Python version: 3.7.9
Rope version: 1.8.0
Text editor/IDE and version: (no editor, using as a library)
Additional context
(I know the 'expected code' would not run correctly but I know the Remove-Argument-refactoring does not modify the function body so I do not expect that to happen here either)
Activity