mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Python: Fix false positive for cyclic imports guarded by if False:.
This commit is contained in:
@@ -22,7 +22,8 @@ predicate circular_import(ModuleValue m1, ModuleValue m2) {
|
||||
ModuleValue stmt_imports(ImportingStmt s) {
|
||||
exists(string name |
|
||||
result.importedAs(name) and not name = "__main__" |
|
||||
name = s.getAnImportedModuleName()
|
||||
name = s.getAnImportedModuleName() and
|
||||
s.getASubExpression().pointsTo(result)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user