Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Test multi-suggestion-ending-in-comma with pre-commit hook

Offen
#3,526 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
42/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python

Rechercherichtung

The failing check is in codespell_lib/tests/test_dictionary.py (test_dictionary_formatting) which requires multiple corrections to end with a trailing comma. Start from that test and the dictionary files it scans, then add a pre-commit hook (or sed as sketched) that on comma-containing lines strips extra trailing commas and leaves exactly one. Done when the existing assertion no longer fails and the hook is wired so the same formatting is enforced on commit.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

duplicate

It should be easy to write a little sed script to auto-fix/format this:

codespell_lib/tests/test_dictionary.py:80: in test_dictionary_formatting
    raise AssertionError(msg)
E   AssertionError: 
E   error disturbative: multiple corrections must end with trailing ","
sed '/,/s/,*$/,/' filename

This should:

  • on all lines with commas
  • remove trailing commas
  • and add a single trailing commas
Vorherrschende Sprache
Python
Sterne
2.4k
Forks
531
Ø Merge
15 Std. 5 Min.
Gemergte PRs (30 T.)
18

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codespell-project/codespell

Alle Issues in codespell-project/codespell

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.