From f7085239a9bcbef5a8d634bea0f91c647759b34e Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 11 Mar 2026 09:51:30 +0000 Subject: [PATCH] fix(manager): skip ignored files early to suppress spurious warnings Files like aw-qt.spec are already in ignored_filenames, but the discovery loop only checked ignored_filenames via filter_modules after building the module list. This meant non-executable matches (e.g. aw-qt.spec on Windows) still triggered 'Found matching file but was not executable' warnings before being filtered out. Skip ignored filenames at the start of the loop so they never reach the warning branch. Also moves the _filename_to_name() call up so it's computed once and reused. Fixes spurious warnings reported in #110. --- aw_qt/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aw_qt/manager.py b/aw_qt/manager.py index ad6d40a..1f996b2 100644 --- a/aw_qt/manager.py +++ b/aw_qt/manager.py @@ -55,8 +55,10 @@ def _discover_modules_in_directory(path: str) -> List["Module"]: matches = glob(os.path.join(path, "aw-*")) for path in matches: basename = os.path.basename(path) + name = _filename_to_name(basename) + if name in ignored_filenames: + continue if is_executable(path, basename) and basename.startswith("aw-"): - name = _filename_to_name(basename) modules.append(Module(name, Path(path), "bundled")) elif os.path.isdir(path) and os.access(path, os.X_OK): modules.extend(_discover_modules_in_directory(path))