Rename Method refactoring does not change the name of the super method in the classes that override it
Mantenedores costumam responder em até 7 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
Direção de pesquisa
Reproduce with the two-class snippet in the issue: apply Rename Method to BaseFormat.to_iterable and confirm DelimitedFormat.to_iterable keeps its old name. The issue does not name the rope source files, so locate the rename logic yourself. Done means the overriding method in the subclass is renamed too, and the base method's NotImplementedError body is left intact.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Rename Method refactoring applied to a method defined in a super class does not modify the signature of the method in the classes that override it
- Steps to reproduce the behavior:
class BaseFormat(object):
def __init__(self, fp, **kwargs):
pass
def to_iterable(self):
raise NotImplementedError('Must implement a "to_iterable" method.')
class DelimitedFormat(BaseFormat):
def __init__(self, fp, **kwargs):
BaseFormat.__init__(self, fp, **kwargs)
def to_iterable(self):
return None
-
Apply the Rename Method refactoring with any new name to 'BaseFormat.to_iterable'
-
Expected code after refactoring:
class BaseFormat(object):
def __init__(self, fp, **kwargs):
pass
def new_method_name(self):
raise NotImplementedError('Must implement a "to_iterable" method.')
class DelimitedFormat(BaseFormat):
def __init__(self, fp, **kwargs):
BaseFormat.__init__(self, fp, **kwargs)
def new_method_name(self):
return None
- The method that overrides the original method in the subclass is not renamed
- Linguagem predominante
- Python
- Estrelas
- 2.2k
- Forks
- 197
- Merge médio
- 2d 13h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de python-rope/rope
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
python-rope/rope#927 ·
Mantenedores costumam responder em até 7 dias
-
Extract raises IndexError or ModuleSyntaxError instead of RefactoringError for an empty or whitespace-only regionTalvez já em andamento @aliassar assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
python-rope/rope#926 ·
Mantenedores costumam responder em até 7 dias
-
simplify.real_code blanks t-strings, so renames inside them edit the wrong offsetTalvez já em andamento @sean0407 assumiu há 10 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
python-rope/rope#913 ·
Mantenedores costumam responder em até 7 dias
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
python-rope/rope#925 ·
Mantenedores costumam responder em até 7 dias
-
Extract method/variable and introduce parameter don't check whether the new name is already in useAberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
python-rope/rope#924 ·
Mantenedores costumam responder em até 7 dias
Todas as issues de python-rope/rope
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
unionai-oss/pandera#2640 ·
Mantenedores costumam responder em até 2 dias
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
JdeRobot/RoboticsInfrastructure#843 ·
Mantenedores costumam responder em até 1 dia
-
automated endpoint-dead needs-curation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
almanac-data/climate-almanac#122 ·
Mantenedores costumam responder em até 1 dia
-
area:harness enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
evarness-ai/iris-harness#420 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
suitenumerique/find#206 ·
Mantenedores costumam responder em até 2 dias