Skip to content

Commit 991be35

Browse files
committed
Revert "Make text option an argument instead of an option"
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.
1 parent f442494 commit 991be35

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ commands =
9292
labelle --version
9393
labelle --help
9494
python -c "import labelle.gui.gui; print('GUI import succeeded')"
95-
labelle --output console "single line"
96-
labelle --output console-inverted "inverted"
97-
labelle --output console multiple lines
95+
labelle --output console --text "single line"
96+
labelle --output console-inverted --text "inverted"
97+
labelle --output console --text multiple --text lines
9898
labelle --output console --barcode "Barcode" --barcode-type code128
99-
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 Caption
100-
labelle --output console --qr QR
101-
labelle --output console --qr QR Caption
99+
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 --text "Caption"
100+
labelle --output console --qr "QR"
101+
labelle --output console --qr "QR" --text "Caption"
102102
labelle --output console --picture ./labelle.png
103103
104104
[testenv:{clean,build}]

src/labelle/cli/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def default(
130130
] = None,
131131
text: Annotated[
132132
Optional[List[str]],
133-
typer.Argument(
133+
typer.Option(
134134
help="Text, each parameter gives a new line",
135135
rich_help_panel="Elements",
136136
),

0 commit comments

Comments
 (0)