Skip to content

Commit 77df172

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 2f7984f commit 77df172

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
@@ -84,13 +84,13 @@ commands =
8484
labelle --version
8585
labelle --help
8686
python -c "import labelle.gui.gui; print('GUI import succeeded')"
87-
labelle --output console "single line"
88-
labelle --output console_inverted "inverted"
89-
labelle --output console multiple lines
87+
labelle --output console --text "single line"
88+
labelle --output console_inverted --text "inverted"
89+
labelle --output console --text multiple --text lines
9090
labelle --output console --barcode "Barcode" --barcode-type code128
91-
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 Caption
92-
labelle --output console --qr QR
93-
labelle --output console --qr QR Caption
91+
labelle --output console --barcode-with-text "Barcode" --barcode-type code128 --text "Caption"
92+
labelle --output console --qr "QR"
93+
labelle --output console --qr "QR" --text "Caption"
9494
labelle --output console --picture ./labelle.png
9595
9696
[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)