Man help page shows up for objects even if `-- --help` isn't passed
- 主要語言
- Python
- 星號
- 28.2k
- 分支
- 1.5k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Based on my understanding of the [`_PrintResult`](https://github.com/google/python-fire/blob/master/fire/core.py#L241) function, it seems like the help page with possible methods will pop up if returning an object, even if `-- --help` isn't passed. It seems like the help page should only pop up if explicitly added.
Here is an example I came across:
I set up a fire script to connect to a sql database and run a sql file or code and return the connections cursor. Sometimes I want want to run a file creating a table or insert data without calling another method. Other times I may want to call `- fetchone` to see one row of results from a query. I don't want man pages to pop up the times where I don't call another method on the cursor, but that is what happens.
貢獻指南
研究方向
從 issue 中連結的 fire/core.py 裡的 _PrintResult 函式開始,然後分別在有和沒有 -- --help 的情況下重現 SQL 游標範例。追蹤物件結果何時會導致說明頁面出現;當回傳的物件不會顯示說明,除非明確傳入該選項時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100