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

Docs don't mention when a class method is considered private v.s public / --help behavior is confusing

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

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

評価

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

調査の方向性

issue にある Python Fire MWE から始め、そこで説明されている引数なし、--help、--verbose の動作を比較します。クラスメソッドがいつ public または private として公開されるのか、またこれらの --help の呼び出しでなぜ動作が異なるのかを説明するよう、関連するドキュメントを更新します。新しいコントリビューターがメソッドを public にする方法を判断でき、文書化された --help の動作を理解できれば完了です。

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

説明

Here's a MWE:

#!/usr/bin/env python

from fire import Fire

class Example:
    def version(self):
        return "bla"
    def start(self):
        print("starting")
    def stop(self):
        print("stopping")

Fire(Example)

Running this script without arguments shows the available commands - OK:

NAME
    fire-bug.py

SYNOPSIS
    fire-bug.py COMMAND

COMMANDS
    COMMAND is one of the following:

     start

     stop

     version

But the more common (and usually safe) thing to do when a user is being introduced a new command, is to run it with a --help. However, Fire doesn't behave the same for this argument:

INFO: Showing help with the command 'fire-bug.py -- --help'.

NAME
    fire-bug.py

SYNOPSIS
    fire-bug.py -

Unless you use --verbose as well. Why is that? This is not trivial for a user to guess, and only reading the docs here led me to this conclusion. Plus, the docs don't mention how to make a class method a "public" method...

主要言語
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 を短くまとめたダイジェスト。