google / google/python-fire

Is it possible to return `argparser` for customization?

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

描述

`fire` can complete ~90% of the CLI needs for my application. However, the help documentation is only available during runtime in my case. Is there some way of getting access to the `argparse` parser from Fire and modifying it as a user? It looks like the overload-able information is available up to this point:

https://github.com/google/python-fire/blob/ed44d8b801fc24e40729abef11b2dcbf6588d361/fire/core.py#L129

After which it disappears into the void. I would love to be able to modify this parser by adding runtime information. Bonus points if after doing so, I can give it back to `fire` to call the component trace, etc. 🙂

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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