Convert Python qlref tests to inline expectations

This commit is contained in:
Owen Mansel-Chan
2026-06-15 11:06:48 +01:00
parent d6ade8fe95
commit 0c2df7c7e9
475 changed files with 1612 additions and 1382 deletions

View File

@@ -1 +1,2 @@
Variables/LeakingListComprehension.ql
query: Variables/LeakingListComprehension.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -2,12 +2,12 @@ from __future__ import print_function
def undefined_in_3():
[x for x in range(3)]
print(x)
print(x) # $ Alert
def different_in_3():
y = 10
[y for y in range(3)]
print(y)
print(y) # $ Alert
def ok():
[z for z in range(4)]

View File

@@ -1,6 +1,6 @@
__all__ = [ "x", "y", "z", "module" ]
__all__ = [ "x", "y", "z", "module" ] # $ Alert[py/undefined-export]
x = 1
if 0:

View File

@@ -1 +1,2 @@
Variables/UndefinedExport.ql
query: Variables/UndefinedExport.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1 +1,2 @@
Variables/UndefinedGlobal.ql
query: Variables/UndefinedGlobal.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1 +1,2 @@
Variables/UninitializedLocal.ql
query: Variables/UninitializedLocal.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1 +1 @@
__all__ = [ "module", "not_exists" ]
__all__ = [ "module", "not_exists" ] # $ Alert[py/undefined-export]