Allow epilog without indentation.

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

メンテナーはふだん 1 日以内に返信

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

  • #3830 @raghibhaque による — マージされずにクローズ

評価

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

調査の方向性

まず、提供された Click グループを再現し、現在の regression --help の出力と、要求されたエピローグのフォーマットを比較します。グループのエピローグのインデントを担当しているヘルプ生成経路を追跡します。既存のヘルプ出力とコマンドのフォーマットを引き続き機能させたまま、エピローグ全体をインデントなしにできれば完了です。

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

説明

help output

When adding an epilog to a group, the text appears to be indented under the commands list.

@click.group(
    context_settings={"max_content_width": 100, "show_default": True},
    epilog="""\b
    Example Usage:
        # Run this stuff first
        $ some-command
        
        # Then run this command
        my-click-script go
    """,
)
def regression() -> None:
    """This is a tool with lots of commands."""
    pass
$ regression --help

Usage: regression [OPTIONS] COMMAND [ARGS]...

  This is a tool with lots of commands.

Options:
  --help  Show this message and exit.

Commands:
  bundle  Wrap it all up.
  guard   Run lots of verifications.
  report  Generate a report from a bundle.
  run     Do stuff.
  store   Don't use this; it's for CI/CD only.
  verify  Compare two reports and verify they are identical.

  Example Usage:
      # Run this stuff first
      $ some-command
      
      # Then run this command
      regression guard

I want the entire epilog to not be indented. Perhaps indent-epilog=False?

主要言語
Python
スター
17.8k
フォーク
3.3k
平均マージ
3日 3時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

pallets/click のほかの issue

pallets/click の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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