Rename Method allows changing datamodels function names.
Maintainer antworten meist innerhalb von 7 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Start with the rename refactoring in rope's refactor package, where the rename method is applied to a function definition, and check how it treats special methods such as __new__. Reproduce with the Singleton snippet in the issue to see that the definition is renamed while the super().__new__ call is left alone. The issue does not say whether dunder methods should be refused or renamed differently, so confirm the intended behavior with the maintainers before changing code.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Rename Method allows changing datamodels function names.
Steps to reproduce the behavior:
- Code before refactoring:
class Singleton:
_instancia = None
def __new__(cls):
if cls._instancia is None:
cls._instancia = super().__new__(cls)
return cls._instancia
a = Singleton()
b = Singleton()
print(a is b)
-
Apply the rename method to
Singleton.__new__ -
Code after refactoring:
class Singleton:
_instancia = None
def get_instance(cls):
if cls._instancia is None:
cls._instancia = super().__new__(cls)
return cls._instancia
a = Singleton()
b = Singleton()
print(a is b)
- Vorherrschende Sprache
- Python
- Sterne
- 2.2k
- Forks
- 197
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python-rope/rope
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
python-rope/rope#927 ·
Maintainer antworten meist innerhalb von 7 Tagen
-
Extract raises IndexError or ModuleSyntaxError instead of RefactoringError for an empty or whitespace-only regionEvtl. vergeben @aliassar hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
python-rope/rope#926 ·
Maintainer antworten meist innerhalb von 7 Tagen
-
simplify.real_code blanks t-strings, so renames inside them edit the wrong offsetEvtl. vergeben @sean0407 hat das vor 11 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
python-rope/rope#913 ·
Maintainer antworten meist innerhalb von 7 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
python-rope/rope#925 ·
Maintainer antworten meist innerhalb von 7 Tagen
-
Extract method/variable and introduce parameter don't check whether the new name is already in useOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
python-rope/rope#924 ·
Maintainer antworten meist innerhalb von 7 Tagen
Alle Issues in python-rope/rope
Ähnliche Issues
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishableEvtl. vergeben @RaphaelFakhri hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
mozilla/code-review#3794 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][autodoc] Update docs that still describe the security registry as emptyEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] adb backup script reports "Done" & exits 0 when the backup failsEvtl. vergeben @bhattmanthan hat das heute übernommen. Offenrequest-issue-assignment
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
OWASP/mastg#4034 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent-ui bug p2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
amd/gaia#6580 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
correction metadata
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
acl-org/acl-anthology#10768 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag