Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[feature request] Exclude function (kw)args from synopsis, arguments and flags in help output

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
cli

調査の方向性

この issue では、ファイル、テスト、エントリポイントが指定されていません。まず、ヘルプの概要、引数、フラグを構築するコードを特定し、次にアンダースコアの除外、リテラルのみの除外、型/モジュールの除外という提案されたアプローチを比較してください。完了条件は、合意された除外 API と、除外されたキーワード引数が各ヘルプセクションに表示されなくなったことを示すテストです。

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

説明

enhancement

The help output lists all function (keyword) arguments in the synopsis, arguments and flags.

In my specific use case, I would like to exclude some of those arguments, because they are:

  1. of non-literal type, and therefore not easily provided through the means of CLI
  2. injected by a dependency injection decorator

The option to exclude (keyword) arguments could be done in a couple of ways:

  1. prefix the argument name with an underscore, e.g.
def my_function(a: bool, _complex_type: ComplexType = ComplexType()):
  ...
  1. limit args and kwargs to literal types
fire.Fire(help_include_literals_only=True)
  1. provide the means to exclude arguments based on module or instance type, e.g.
def my_function(a: bool, s: service.ComplexType):
  ...

fire.Fire(
  help_exclude_arg_types=[service.ComplexType],
  help_exclude_arg_modules=[service]
)
主要言語
Python
スター
28.2k
フォーク
1.5k
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

google/python-fire のほかの issue

google/python-fire の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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