python / python/blurb

Preserve indentation in multi-line list entry

Offen
#11 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
22
Forks
13
Ø Merge
4 Std. 3 Min.
Gemergte PRs (30 T.)
5

Beschreibung

I would like to put this in a NEWS entry:

The following `threading` methods are now deprecated and should be replaced:

- `threading.activeCount` => :func:`threading.active_count`

- `threading.Condition.notifyAll` =>
    :meth:`threading.Condition.notify_all`

But when blurb generates the NEWS file, it produces:

- bpo-43723: The following `threading` methods are now deprecated and should
  be replaced:

  - `threading.activeCount` => :func:`threading.active_count`

  - `threading.Condition.notifyAll` =>
  :meth:`threading.Condition.notify_all`

Which is invalid rst, because the second line of the list is not indented enough.

It's because blurb uses textwrap.wrap to reflow the text, and that function eats any leading space in the line. Fixing this might require doing something more RST-aware.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Verwendung von Python's textwrap.wrap in blurb zu lokalisieren und das Problem mit dem hier gezeigten NEWS-Eintrag zu reproduzieren. Verfolge, wie mehrzeilige Listeneinträge neu umgebrochen werden, und überprüfe anschließend, dass die erzeugte Ausgabe die für gültiges reStructuredText erforderliche Einrückung beibehält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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