From a3e46121da94649036fefb23c2a272df2b2e4055 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 22 Jul 2026 22:29:21 +0200 Subject: [PATCH] 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 --- conf/templates/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/templates/pyproject.toml b/conf/templates/pyproject.toml index 714ea7ab..5c71db50 100644 --- a/conf/templates/pyproject.toml +++ b/conf/templates/pyproject.toml @@ -15,6 +15,7 @@ "ignore-without-code", "possibly-undefined", "truthy-bool", + "truthy-iterable", ] [tool.isort]