From b2688bba7d85b191efa7feafde5d26d22c7e74ea Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 25 Jul 2023 17:24:04 +0200 Subject: [PATCH] Python: Relax module resolution Do not require modules to reside in a package --- python/ql/lib/semmle/python/Module.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/lib/semmle/python/Module.qll b/python/ql/lib/semmle/python/Module.qll index 87116a1d98b..4ee5c518f03 100644 --- a/python/ql/lib/semmle/python/Module.qll +++ b/python/ql/lib/semmle/python/Module.qll @@ -195,7 +195,7 @@ private predicate isPotentialPackage(Folder f) { } private string moduleNameFromBase(Container file) { - isPotentialPackage(file) and result = file.getBaseName() + result = file.getBaseName() or file instanceof File and result = file.getStem() }