Inconsistent behaviour between --help and no arguments
还没有人认领这个 Issue。
评估
调研方向
首先,使用 issue 中链接的 PythonSearch 示例重现不带参数和使用 --help 之间的差异,然后跟踪每种调用方式的 CLI 帮助生成路径。完成的标准是:两种方式都显示相同的类选项,包括实例级命令,同时不丢失现有的帮助输出。
由索引模型根据 Issue 内容生成。
描述
I'm a big fan of Python Fire, it's been a huge help in building my projects. I have a small improvement request: I noticed that when I don't pass any arguments to my Fire program, I get an overview of all options of my class. However, when I pass --help, it only describes the class-level functions and misses out the instance-level ones.
I would love to see consistent behavior between the two approaches, ideally it should print all options of the class in both cases.
Thank you for your time!
Example of a personal project.
$ python_search
NAME
python_search - Welcome to PythonSearch, An open-source assistant that helps you collect, retrieve and refactor information (and programs) efficiently using Python
SYNOPSIS
python_search - GROUP | COMMAND
DESCRIPTION
Welcome to PythonSearch, An open-source assistant that helps you collect, retrieve and refactor information (and programs) efficiently using Python
GROUPS
GROUP is one of the following:
configuration
The main _configuration of Python Search Everything to customize about the application is configurable via code through this class
COMMANDS
COMMAND is one of the following:
configure_shortcuts
Generate shortcuts for the current configuration
install_missing_dependencies
Install all missing dependencies that cannot be provided through the default installer
new_project
Create a new project in the current directory with the given name
register_new_ui
Starts the UI for collecting a new entry into python search
run_key
Runs an entry given its name or its partial name.
search
Opens the Search UI. Main entrypoint of the application
set_project_location
If you have a python search project already you can specify its location with this command
And with the --help with less content
$ python_search --help
NAME
python_search - Welcome to PythonSearch, An open-source assistant that helps you collect, retrieve and refactor information (and programs) efficiently using Python
SYNOPSIS
python_search COMMAND | <flags>
DESCRIPTION
Welcome to PythonSearch, An open-source assistant that helps you collect, retrieve and refactor information (and programs) efficiently using Python
FLAGS
--configuration=CONFIGURATION
Type: Optional[Optional]
Default: None
COMMANDS
COMMAND is one of the following:
install_missing_dependencies
Install all missing dependencies that cannot be provided through the default installer
new_project
Create a new project in the current directory with the given name
set_project_location
If you have a python search project already you can specify its location with this command
- 主要语言
- Python
- 星标
- 28.2k
- 派生
- 1.5k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/python-fire 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
google/python-fire#693 ·
-
Release 0.7.2? 未关闭
难度 3/5 1-2 天 新手友好度 38/100
google/python-fire#698 ·
-
难度 3/5 1-2 天 新手友好度 58/100
google/python-fire#672 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
google/python-fire#665 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 55/100
google/python-fire#659 · 1 条评论 ·
查看 google/python-fire 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
canonical/paas-charm#368 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
tech debt
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
StevenBlack/hosts#3256 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
qualcomm/qai-appbuilder#275 ·