Inline Method refactoring is allowed in abstract methods.

Aperta
#744 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
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
devtools

Direzione di ricerca

Start by reproducing the issue with the Base.tag() snippet in the report, then find the Inline Method refactoring entry point in rope's refactoring code. The report doesn't name the file, so search for it. Done means applying Inline Method to an abstract method warns or refuses, and a test covers the snippet. The report says 'warning' but doesn't say whether it should be an error, so confirm with a maintainer before choosing.

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

Descrizione

bug inline-refactor

Abstract methods do not have an implementation in the class where they are declared; their implementation is expected to be provided by concrete subclasses.
It would be nice if Rope emitted a warning.

Steps to reproduce the behavior:

  1. Code before refactoring:
from abc import abstractmethod


class Base:

    @abstractmethod
    def tag(self, text, tokenize=True):
        return
  1. Apply the Inline Method refactoring to Base.tag().
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.