Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8986e2f
feat: :sparkles: Include several approaches of improving the CLI
joelostblom Feb 20, 2026
ef2a603
fix: :bug: Clean up to only keep the current suggestion
joelostblom Feb 20, 2026
52882f5
feat: :sparkles: Show default value also for `None`
joelostblom Feb 20, 2026
c9251ff
refactor: :recycle: Use functional style
joelostblom Feb 23, 2026
314dbff
docs: :memo: Explain need for sorting
joelostblom Feb 23, 2026
8df5e66
test: :white_check_mark: Avoid testing private modules
joelostblom Feb 23, 2026
a5ea441
Merge branch 'main' into feat/beautify-cli-help
lwjohnst86 Feb 24, 2026
4360ed7
Apply suggestions from code review
joelostblom Feb 24, 2026
824bdd7
chore(pre-commit): :pencil2: automatic fixes
pre-commit-ci[bot] Feb 24, 2026
bb4c41d
test: :white_check_mark: Remove coverage config
joelostblom Feb 24, 2026
b5ae897
fix: :bug: Uuse more descriptive variable name
joelostblom Feb 24, 2026
f4c70c2
Merge branch 'main' into feat/beautify-cli-help
lwjohnst86 Feb 24, 2026
206d742
Apply suggestion from @joelostblom
joelostblom Feb 24, 2026
7d94a3a
Merge branch 'main' into feat/beautify-cli-help
lwjohnst86 Feb 25, 2026
ad65ac8
docs: 📝 Reformat as per just run all
joelostblom Mar 2, 2026
775eeae
Merge branch 'main' into feat/beautify-cli-help
joelostblom Mar 2, 2026
4aff1f8
test: ✅ Reformat test strings to match new help format
joelostblom Mar 2, 2026
79cfe34
test: ✅ Test color output in help message
joelostblom Mar 2, 2026
5e1f4f3
chore(pre-commit): :pencil2: automatic fixes
pre-commit-ci[bot] Mar 2, 2026
87f1a1a
chore: 🔧 Restore unintended formatting changes
joelostblom Mar 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

22 changes: 10 additions & 12 deletions src/seedcase_flower/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,20 @@ def _read_properties(path: Path) -> dict[str, Any]:

def _format_param_help(entry: HelpEntry) -> str:
"""Re-structure the parameter help into a more readable format."""
if entry.names:
# Sort to put the flag first (eg `--uri URI` instead of the default `URI --uri`)
names = map(_add_highlight_syntax, sorted(entry.names), repeat(entry.type))
# Sort to put the flag first (eg `--uri URI` instead of the default `URI --uri`)
names = map(_add_highlight_syntax, sorted(entry.names), repeat(entry.type))
return f"{' '.join(names)}".strip()


def _add_highlight_syntax(name: str, entry_type: type | None) -> str:
"""Add markup character to highlight in colors, etc where desired."""
formatted_name = f"[bold cyan]{name}[/bold cyan]"
if not name.startswith("-"):
# Don't output redundant value placeholder for boolean flags
# Matching the `dim` used by default in cyclopts for `choices` and
# `defaults` in the description
formatted_name = f"[dim]<{name}>[/dim]"

# Don't formatted_name redundant value placeholder for boolean flags
if get_hint_name(entry_type) == "bool":
name = ""
else:
# Matching the `dim` used by default in cyclopts for `choices` and
# `defaults` in the description
name = f"[dim]<{name}>[/dim]"
else:
name = f"[bold cyan]{name}[/bold cyan]"
return name
formatted_name = ""
return formatted_name
Loading