From 38c776e6385173a8508fae500af92f3a5792ea6d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 24 Jul 2026 10:10:03 +0200 Subject: [PATCH] lib.Distro: Fix mypy.truthy-bool fallout The _select() method in Distro.py has an assert on a PackageFilter parameter that doesn't define __bool__ or __len__. Since the type signature already guarantees it is not None, the assertion is redundant and is now removed. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1 Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/Distro.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/jw/pkg/lib/Distro.py b/src/python/jw/pkg/lib/Distro.py index 84c9e5bb..369facf9 100644 --- a/src/python/jw/pkg/lib/Distro.py +++ b/src/python/jw/pkg/lib/Distro.py @@ -364,7 +364,6 @@ class Distro(abc.ABC): async def _select(self, names: Iterable[str], filter: PackageFilter) -> Iterable[Package]: - assert filter, 'No filter in _select()' return [p for p in await self._select_by_name(names) if filter.match(p)] async def select(