Rename Field refactoring allows you to change the method parameter, causing inconsistent override
Mantenedores costumam responder em até 7 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
Start by reproducing the issue with the BaseTagger and PatternTagger snippet, then apply Rename Field to the 'text' parameter of PatternTagger.tag. The payload does not name the rope source files, so locate the rename-field refactoring code yourself. Done means rope either warns or refuses when the renamed parameter belongs to a method that overrides a base-class method, and the snippet shows that behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Rename Field refactoring allows you to change the method parameter, causing inconsistent override
It would be nice if Rope sent an alert to prevent the user from changing the overridden method signature
- Steps to reproduce the behavior:
from abc import abstractmethod
class BaseTagger:
@abstractmethod
def tag(self, text, tokenize=True):
return
class PatternTagger(BaseTagger):
def tag(self, text, tokenize=True):
if not isinstance(text, str):
text = text.raw
return [text, tokenize]
- Apply the Rename Field refactoring with the new name 'tag' to the field 'PatternTagger.tag.text'
- 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 há 2 dias. 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á 12 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 useTalvez já em andamento @aliassar assumiu hoje. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
python-rope/rope#924 · 1 comentário ·
Mantenedores costumam responder em até 7 dias
Todas as issues de python-rope/rope
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
jejjohnson/gaussx#752 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
521xueweihan/HelloGitHub#4270 ·
-
enhancement owner: den-haag
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
Mantenedores costumam responder em até 6 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ok-oldking/ok-wuthering-waves#1828 ·
Mantenedores costumam responder em até 1 dia
-
lesson-submission pending-review
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
Ikalus1988/MisakaNet#4512 ·
Mantenedores costumam responder em até 1 dia