pyproject.toml: Enable mypy.truthy-iterable

Add the truthy-iterable error code to the mypy configuration. This
detects Iterable parameters that are used in boolean contexts (if not
names, etc.) since Iterable values are always truthy.

The fix is to change Iterable[str] parameters to Collection[str] when
they are tested for emptiness, since Collection guarantees __len__.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-22 22:29:21 +02:00
commit a3e46121da

View file

@ -15,6 +15,7 @@
"ignore-without-code",
"possibly-undefined",
"truthy-bool",
"truthy-iterable",
]
[tool.isort]