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:
parent
dcbd4b1c84
commit
a3e46121da
1 changed files with 1 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
|||
"ignore-without-code",
|
||||
"possibly-undefined",
|
||||
"truthy-bool",
|
||||
"truthy-iterable",
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
|
|
|
|||
Loading…
Reference in a new issue