rope
rope copied to clipboard
Update `__all__` when renaming an imported variable/function/class
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Code before refactoring:
# mod1.py
__all__ = ['old_name']
old_name = 1
# mod2.py
from mod1 import *
print(old_name)
- Describe the refactoring you want to do
Rename old_name to new_name
- Expected code after refactoring:
# mod1.py
__all__ = ['new_name']
new_name = 1
# mod2.py
from mod1 import *
print(new_name)
- Describe the error or unexpected result that you are getting
The __all__ dictionary was left still using the old_name:
__all__ = ['old_name']
Editor information (please complete the following information):
- Rope version: 0.20.1