mirror of
https://github.com/github/codeql.git
synced 2026-05-14 19:29:28 +02:00
Python: Port import metrics queries
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user