Improve text wrapping
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
リンクされたドキュメントで説明されている Click のテキスト折り返し動作から始め、コンソール幅を 60 にして例を再現します。ヘルプテキストのフォーマット処理のエントリポイントを追跡し、改行を保持しながらコンソール幅に合わせて折り返すことを確認するカバレッジを追加します。長い行がはみ出さず、単語が予期せず分割されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Currently click has 2 modes to display a help text:
- Word-wrap the entire blob, and remove all other whitespaces
- Preserve newlines, but disable word-wrapping
- with a console width of 60, visualized with the
*:
************************************************************
Usage: click_wrapping.py [OPTIONS]
Options:
--test [value1|value2] Example text to show word
wrapping. 'Value1' - short
comment. 'Value2' - A longer
comment that should wrap to the
next line.
--help Show this message and exit.
************************************************************
- with a console width of 60, visualized with the
*:
************************************************************
Usage: click_wrapping.py [OPTIONS]
Options:
--test [value1|value2] Example text to show word wrapping.
'Value1' - short comment.
'Value2' - A longer comment that should wrap to the next line.
--help Show this message and exit.
************************************************************
The 2nd option is slightly problematic, because on an actual console with width of 60, it looks like this:
************************************************************
Usage: click_wrapping.py [OPTIONS]
Options:
--test [value1|value2] Example text to show word wrapping
.
'Value1' - short comment.
'Value2' - A longer comment that s
hould wrap to the next line.
--help Show this message and exit.
************************************************************
And that should probably be more along the lines of:
************************************************************
Usage: click_wrapping.py [OPTIONS]
Options:
--test [value1|value2] Example text to show word
wrapping.
'Value1' - short comment.
'Value2' - A longer comment that
should wrap to the next line.
--help Show this message and exit.
************************************************************
Would a PR to fix this be accepted?
(As in, preserve newlines but still wrap on the console width)
- 主要言語
- Python
- スター
- 17.8k
- フォーク
- 3.3k
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pallets/click のほかの issue
-
`show_envvar=True` Drops Environment Variable from Error Messages When Using `auto_envvar_prefix`オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
More private utilities that need to be marked and public api deprecated再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンtyping
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pallets/click#3847 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
Automatically append ellipsis (`...`) to metavars when `multiple=True` in options対応中かも @SparshGarg999 が 89 日前に担当しました。 オープンhelp output
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pallets/click#3652 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
`HelpFormatter.write_usage` breaks options at a hyphen対応中かも @kdeldycke が 9 日前に担当しました。 オープンhelp output
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pallets/click#3362 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Add glossary of terms to click reference docs対応中かも @rohitbarhate111-commits が 55 日前に担当しました。 オープンdocs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pallets/click#3077 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gke-labs/kube-agents#5671 ·
メンテナーはふだん 1 日以内に返信
-
docs(auth): Method B step 4 should tell users to tick "Use this client for an AI-powered agent"オープンdocumentation next-release v0.9.6
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
khuisman/mcp-gee-sweet#1446 ·
メンテナーはふだん 1 日以内に返信
-
model:sonnet runtime:claude security size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
FootprintAI/Containarium#3671 ·
メンテナーはふだん 1 日以内に返信
-
HolidayBase: reassigning `language` does not re-initialize translations or re-populate holidays対応中かも @shikhabhadoria が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vacanza/holidays#4116 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug CLI exec
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信