Recommended autoformatters?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Dokumentation
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- documentation
Rechercherichtung
Beginne in docs/writing/style.rst bei der bestehenden Erwähnung von autopep8 und prüfe anschließend den verlinkten Vergleich von autopep8, black und yapf. Aktualisiere das Code-Style-Dokument mit Hinweisen zu diesen Formatierern und einer klaren Empfehlung oder einem Vergleich; der Abschnitt sollte erklären, wie Entwickler einen Autoformatter auswählen können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
In the Code Style document https://github.com/realpython/python-guide/blob/master/docs/writing/style.rst there's a small mention of autopep8 which can be used to format code to meet PEP8 standards. But there's at least two other autoformatters (black and yapf) which are as good if not better. There's a blog comparing the three here: https://medium.com/3yourmind/auto-formatters-for-python-8925065f9505
The gist of it is: autopep8 is the most conservative, black is the most opinionated, and yapf is somewhere in between depending on how you configure it.
Should the python guide have an opinion on which auto formatters should be used? In addition to the current mention of autopep8. I think it would be good to expand this section; auto formatters are quite useful and of great interest to developers coming from tools like gofmt and prettier.
- Vorherrschende Sprache
- Batchfile
- Sterne
- 29.8k
- Forks
- 5.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
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 realpython/python-guide
-
Page 404 error Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
realpython/python-guide#1104 · 2 Kommentare ·
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 62/100
realpython/python-guide#327 ·
-
PyZMQ improvements Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
realpython/python-guide#326 · 5 Kommentare ·
-
@alex Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
realpython/python-guide#1194 ·
-
Development Team SAP Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
realpython/python-guide#1192 ·