8000 Fix help for sub commands not displaying Argument by tarsil · Pull Request #37 · dymmond/sayer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix help for sub commands not displaying Argument #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jum 8000 p to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ hide:
- navigation
---

## 0.3.2
## 0.3.4

### Fixed

- Displaying the Arguments in the help of subcommands.

## 0.3.3

!!! Note
Version 0.3.2 had issues and it was skipped

### Changed

Expand Down
2 changes: 1 addition & 1 deletion sayer/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.3"
__version__ = "0.3.4"


def get_version() -> str:
Expand Down
6 changes: 4 additions & 2 deletions sayer/core/console/sayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def render_help_for_command(
user_options = [
p
for p in cmd.params
if isinstance(p, click.Option) and "--help" not in getattr(p, "opts", ()) and not getattr(p, "hidden", False)
if isinstance(p, (click.Option, click.Argument))
and "--help" not in getattr(p, "opts", ())
and not getattr(p, "hidden", False)
]

flags_req_def_desc: list[tuple[str, str, str, str]] = []
Expand All @@ -77,7 +79,7 @@ def render_help_for_command(
default_str = str(default_val)

# Help/Description text
desc = param.help or ""
desc = param.help or "" # type: ignore
flags_req_def_desc.append((flags_str, required_str, default_str, desc))

# —BUILD OPTIONS PANEL ——
Expand Down
0