Automatic code formatting duplicates lines and blocks of code
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, python
- Bereich
- tooling
Rechercherichtung
Beginne damit, das Problem in Atom mit ide-python 1.9.4 oder 1.9.5, aktivierter Formatierung beim Speichern und derselben Python-Datei, die in mehreren Bereichen geöffnet ist, zu reproduzieren. Verfolge den Pfad der automatischen Formatierung und des Speicherns, um festzustellen, warum jeder zusätzliche Tab den Inhalt dupliziert; abgeschlossen ist die Untersuchung, wenn die Formatierung beim Speichern keine Zeilen oder Blöcke mehr dupliziert und die Datei nach einem Speichervorgang nicht als geändert markiert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
There seems to be a bug in automatic code formatting. The bug is triggered by opening the same code file into multiple tabs in separate panes. Having two tabs (of the same file) will cause the bug to occur once, three tabs will cause it to repeat twice, and so on.
I have been using the ide-python package only for a couple days, so I don't know about the specifics. This bug is present in both versions 1.9.4 and 1.9.5 at least. I turned off all checkboxes in the module's settings and restarted Atom, but this bug will still persist. I am using the "format on save" option.
Also, the file status is "modified" again after I save the file and automatic formatting is applied, so the file has to be manually saved twice. I don't think it should be like this.
Example 1
Original code
def foo():
pass
def bar():
pass
Result after automating formatting
def foo():
pass
def bar():
pass
pass
Here the keyword pass is duplicated inside function bar.
Example 2
Original code
def foo():
pass
def bar():
pass
Result after automating formatting
def foo():
pass
def bar():
pass
def bar():
pass
Here the whole function block for bar is duplicated. Formatting is also messed up.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 238
- Forks
- 41
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
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 atom-community/ide-python
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
atom-community/ide-python#575 · 5 Reaktionen ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
atom-community/ide-python#570 · 2 Kommentare · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
atom-community/ide-python#568 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
atom-community/ide-python#567 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
atom-community/ide-python#566 ·
Alle Issues in atom-community/ide-python
Ähnliche Issues
-
Complexity: Small P-Feature: Projects page ready for merge team role: back end/devOps role: front end size: 0.25pt
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 67/100
bellingcat/toolkit#905 ·
-
self-care self-care:docs-build-time-investigator
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 76/100
githubnext/gh-aw-cao#14191 ·
Maintainer antworten meist innerhalb von 1 Tag
-
effort:low impact:medium RAG status: auto-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
mastra-ai/mastra#25229 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
sugarlabs/musicblocks#8984 ·
Maintainer antworten meist innerhalb von 1 Tag