Files
python-kasa/kasa/cli/common.py
WolfGanG 0932f30d06 Strip multi-word rich tags when rich is not installed (#1807)
Without `rich` installed, `kasa` prints tags like `[bold red]Only
discover is available without --host or --alias[/bold red]` verbatim.
The fallback in `kasa/cli/common.py` strips only single-word tags
(`\[/?[a-z]+]`), and `error()` uses the two-word `[bold red]`.

The pattern is changed to `\[/?[a-z]+(?: [a-z]+)*]`, so space-separated lowercase words are stripped too.
2026-10-24 18:11:13 +02:00

9.2 KiB