python-rope/rope

Rename Field refactoring allows you to rename a field with the same name used in a global method

Closed this issue · 1 comments

Rename Field refactoring allows you to rename a field with the same name used in a global method
It would be nice if Rope could alert the user to decide whether to continue or not with the transformation.

Steps to reproduce the behavior:

  1. Code before refactoring:
import csv

DEFAULT_ENCODING = 'utf-8'


class DelimitedFormat(object):
    def __init__(self, fp, **kwargs):
        reader = csv.reader(fp, delimiter=",", encoding=DEFAULT_ENCODING)


def detect(fp, max_read=1024):
    return None
  1. Apply the Rename Field refactoring to 'DEFAULT_ENCODING' with the new name 'detect'

Closing. Ticket merged into #779.