Rename Field refactoring allows the use of a name that can not be iterable
researcher175 opened this issue · 1 comments
researcher175 commented
Rename field refactoring allows the use of post-declared methods as new names for the field.
It would be nice if Rope could emit an alert to the users indicating the probable problems that could be generated if the operation continues.
Python's name resolution can cause type errors during execution.
Steps to reproduce the behavior:
- Code before refactoring:
MIN_CORPORA = ['brown']
ADDITIONAL_CORPORA = ['movie_reviews']
ALL_CORPORA = MIN_CORPORA + ADDITIONAL_CORPORA
def download(param):
pass
def download_lite():
for each in MIN_CORPORA:
download(each)
def download_all():
for each in ALL_CORPORA:
download(each)
def main():
download_lite()
download_all()
main()
- Apply the Rename Field refactoring with the new name 'download_all' to the field 'MIN_CORPORA'