From 685ed51935ffa2f2b38d4dd1d9a469da388d0863 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 3 Nov 2026 15:21:29 +0100 Subject: [PATCH] cmds.pkg.CmdSelect: Load path filter dynamically The select command names PackageFilterString directly, but the filter is a spec string and the class is resolved dynamically by the loader. Build the filter through PathFilter.create() so the concrete class no longer appears at the call site. Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.0 --- src/python/jw/pkg/cmds/pkg/CmdSelect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/jw/pkg/cmds/pkg/CmdSelect.py b/src/python/jw/pkg/cmds/pkg/CmdSelect.py index 9cc38776..f4ee4298 100644 --- a/src/python/jw/pkg/cmds/pkg/CmdSelect.py +++ b/src/python/jw/pkg/cmds/pkg/CmdSelect.py @@ -2,7 +2,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, override -from ...lib.PackageFilter import PackageFilterString +from ...lib.PathFilter import PathFilter from .Cmd import Cmd, Parent if TYPE_CHECKING: @@ -20,8 +20,8 @@ class CmdSelect(Cmd): # export @override async def _run(self, args: Namespace) -> None: - filter = PackageFilterString( - file_context = self.app.exec_context, spec = args.filter + filter = PathFilter.create( + spec = args.filter, file_context = self.app.exec_context ) if args.filter else None if filter is not None: from ...lib.PackageFilter import PackageFilter