python / python/blurb

Preserve indentation in multi-line list entry

オープン
#11 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
22
フォーク
13
平均マージ
4時間 3分
マージ済み PR(30日)
5

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、blurb における Python's textwrap.wrap の使用箇所を見つけ、ここに示した NEWS エントリで問題を再現します。複数行のリスト項目がどのように再整形されるかを追跡し、生成された出力が有効な reStructuredText に必要なインデントを保持していることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。