Skip to content

Commit

Permalink
Revert "Make text option an argument instead of an option"
Browse files Browse the repository at this point in the history
This reverts commit c767a0a.

This changes --text from typer.Argument to typer.Option

This is a breaking change. It puts text on the same level as the other options like image or barcode.
It is breaking because it now requires any text to be preceeded by `--text`.

Ref: <#12 (comment)> and below.
  • Loading branch information
maresb committed Apr 28, 2024
1 parent 2850bf1 commit 4fa36b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ commands =
pip freeze
labelle --version
labelle --help
labelle --output console "single line"
labelle --output console_inverted "inverted"
labelle --output console multiple lines
labelle --output console --text "single line"
labelle --output console_inverted --text "inverted"
labelle --output console --text multiple --text lines
labelle --output console --barcode "Barcode" --barcode-type code128
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 Caption
labelle --output console --qr QR
labelle --output console --qr QR Caption
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 --text "Caption"
labelle --output console --qr "QR"
labelle --output console --qr "QR" --text "Caption"
labelle --output console --picture ./labelle.png
[testenv:{clean,build}]
Expand Down
2 changes: 1 addition & 1 deletion src/labelle/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def default(
] = None,
text: Annotated[
Optional[List[str]],
typer.Argument(
typer.Option(
help="Text, each parameter gives a new line",
rich_help_panel="Elements",
),
Expand Down

0 comments on commit 4fa36b7

Please sign in to comment.