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 May 4, 2024
1 parent f442494 commit 991be35
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 @@ -92,13 +92,13 @@ commands =
labelle --version
labelle --help
python -c "import labelle.gui.gui; print('GUI import succeeded')"
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 @@ -130,7 +130,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 991be35

Please sign in to comment.