Skip to content
Open
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion src/python_learning_orchestrated/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ def main(
if args.checkpoint_command == "list":
checkpoints = checkpoint_store.list_checkpoints()
if not checkpoints:
output_fn("No checkpoints found.")
output_fn(
"No checkpoints found. "
"Use 'checkpoint create <name>' to create one."
)
Comment on lines +226 to +229

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this new message is a great UX improvement, it hardcodes the command string checkpoint create <name>. If the command structure changes in the future, this message could become outdated and misleading.

To improve maintainability, it would be better to define constants for sub-command names (e.g., CREATE_CMD = 'create') and use them to construct user-facing messages consistently across the CLI.

As a smaller step in that direction, the suggested change extracts the command string into a variable to make it more explicit and easier to change.

Suggested change
output_fn(
"No checkpoints found. "
"Use 'checkpoint create <name>' to create one."
)
create_command_usage = "checkpoint create <name>"
output_fn(
f"No checkpoints found. Use '{create_command_usage}' to create one."
)

return
output_fn(f"Checkpoints ({len(checkpoints)}):")
for checkpoint in checkpoints:
Expand Down
Loading