Rename Field allows the use of the object datamodels names.
Les mainteneurs répondent en général sous 7 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 45/100
Piste de recherche
Start with the Rename Field refactoring, the operation applied to Exemplo.texto in the issue. Reproduce it with the two snippets in the body and confirm the rename turns a class attribute into __new__. The fix should make the rename refuse or skip Python data-model names such as __new__, so the refactored class keeps its original behavior. Done when the reproduction no longer changes the name to a dunder and the type(obj) output stays the same.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Rename Field allows the use of the object datamodels names.
Steps to reproduce the behavior:
- Code before refactoring:
class Exemplo:
texto = str
def __init__(self):
print("__init__ rodou")
obj = Exemplo()
print(type(obj))
-
Apply the rename field to
Exemplo.texto -
Code after refactoring:
class Exemplo:
__new__ = str
def __init__(self):
print("__init__ rodou")
obj = Exemplo()
print(type(obj))
- Langage dominant
- Python
- Étoiles
- 2.2k
- Forks
- 197
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de python-rope/rope
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
python-rope/rope#927 ·
Les mainteneurs répondent en général sous 7 jours
-
Extract raises IndexError or ModuleSyntaxError instead of RefactoringError for an empty or whitespace-only regionPeut-être pris @aliassar l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
python-rope/rope#926 ·
Les mainteneurs répondent en général sous 7 jours
-
simplify.real_code blanks t-strings, so renames inside them edit the wrong offsetPeut-être pris @sean0407 l’a pris il y a 10 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
python-rope/rope#913 ·
Les mainteneurs répondent en général sous 7 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
python-rope/rope#925 ·
Les mainteneurs répondent en général sous 7 jours
-
Extract method/variable and introduce parameter don't check whether the new name is already in useOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
python-rope/rope#924 ·
Les mainteneurs répondent en général sous 7 jours
Toutes les issues de python-rope/rope
Issues similaires
-
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
QuantConnect/Documentation#2838 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
awslabs/route53-dynamic-dns-with-lambda#67 · 1 commentaire ·
-
`SubAgents` returns a child run's `DeferredToolRequests` to the parent as a successful tool resultOuvertebug pkg:harness
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
pydantic/pydantic-ai#12405 ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
good first issue help wanted
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100