Python: Port import metrics queries

This commit is contained in:
Taus
2026-02-25 16:36:52 +00:00
parent 603d37cd60
commit 47421a63a4
2 changed files with 8 additions and 8 deletions

View File

@@ -11,8 +11,8 @@
*/
import python
private import LegacyPointsTo
private import semmle.python.dataflow.new.internal.ImportResolution
from ModuleValue m, int n
where n = count(ModuleValue imp | imp = m.getAnImportedModule())
select m.getScope(), n
from Module m, int n
where n = count(Module imp | ImportResolution::imports(m, imp))
select m, n

View File

@@ -11,8 +11,8 @@
*/
import python
private import LegacyPointsTo
private import semmle.python.dataflow.new.internal.ImportResolution
from ModuleValue m, int n
where n = count(ModuleValue imp | imp = m.getAnImportedModule+() and imp != m)
select m.getScope(), n
from Module m, int n
where n = count(Module imp | ImportResolution::imports+(m, imp) and imp != m)
select m, n