google / google/python-fire

How to display class functions in help?

未關閉
#381 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
28.2k
分支
1.5k
PR 合併指標
30 天內沒有已合併 PR

描述

Hey,
I am using a class like:
```
class Foo:
def __init__(self, name):
self.name=name

@property
def info(self):
return self.name

def do_somthing(self, arg1):
return do_it(arg1)

if __name__ == '__main__':
fire.Fire(Foo)
```
I like to be able to see in the help the functions/properties in Foo class not only the args in the constructor.
Does it possible?

Thanks

貢獻指南

開啟貢獻指南

研究方向

從範例中的 fire.Fire(Foo) 進入點開始,重現該類別目前的說明輸出。追蹤說明產生路徑,以判斷類別方法和屬性是如何被發現的。完成的標準是,產生的說明會將 Foo 的函式和屬性與建構函式引數一起列出,並涵蓋範例行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
cli
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。