Undo conversion for queries that import LegacyPointsTo

This commit is contained in:
Owen Mansel-Chan
2026-06-19 11:18:19 +01:00
parent 5497f2c5fe
commit 451fc2e4e7
143 changed files with 287 additions and 358 deletions

View File

@@ -1,2 +1 @@
query: Exceptions/IllegalExceptionHandlerType.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Exceptions/IllegalExceptionHandlerType.ql

View File

@@ -1,2 +1 @@
query: Exceptions/IllegalRaise.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Exceptions/IllegalRaise.ql

View File

@@ -37,21 +37,21 @@ class NotException2(object):
pass
def illegal_raise_type():
raise NotException1 # $ Alert[py/illegal-raise]
raise NotException1
def illegal_raise_value1():
raise "Exception" # $ Alert[py/illegal-raise]
raise "Exception"
def illegal_raise_value2():
raise NotException2() # $ Alert[py/illegal-raise]
raise NotException2()
def illegal_handler():
try:
illegal_raise()
except NotException1: # $ Alert[py/useless-except]
except NotException1:
#Must do something
print("NotException1")
except NotException2: # $ Alert[py/useless-except]
except NotException2:
#Must do something
print("NotException2")
@@ -135,7 +135,7 @@ def a_number():
def illegal_handler2():
try:
illegal_raise()
except a_number(): # $ Alert[py/useless-except]
except a_number():
print ("Caught exception")
def stop_iter_ok(seq):

View File

@@ -11,9 +11,10 @@ def test():
try:
a = A()
raise a
except 42: # $ Alert[py/useless-except]
except 42:
#Some comment
pass
except A:
#Another comment
pass