The Rename Method refactoring is allowed in the overridden method.

Aperta
#746 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Start from the reproduction in the issue: a MyList(list) subclass whose count overrides list.count, then apply Rename Method to MyList.count. Find where the Rename Method refactoring is implemented and how it finds the methods it renames. Done means the rename still runs but emits a warning that names the overridden superclass method. No comments or maintainer decisions exist yet, so confirm the desired warning behaviour before writing code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug rename-refactor

The method that overrides the superclass method receives the refactoring without warning the user that there is a superclass method.
It would be nice if Rope could emit a warning in this case.

Steps to reproduce the behavior:

  1. Code before refactoring:
class MyList(list):

    def count(self, strg, case_sensitive=False, *args, **kwargs):
        return super(MyList, self).count(strg, *args, **kwargs)
  1. Apply the Rename Method in MyList.count().
Lingua principale
Python
Stelle
2.2k
Fork
197
Merge medio
2g 13h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-rope/rope

Tutte le issue di python-rope/rope

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.