Skip to content

Commit 45e47b9

Browse files
committed
Python: IllegalExceptionHandlerType.ql: Autoformats
1 parent 5d55db1 commit 45e47b9

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

python/ql/src/Exceptions/IllegalExceptionHandlerType.ql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
import python
1515

1616
from ExceptFlowNode ex, Value t, ClassValue c, ControlFlowNode origin, string what
17-
where ex.handledException(t, c, origin) and
18-
(
19-
exists(ClassValue x | x = t |
20-
not x.isLegalExceptionType() and
21-
not x.failedInference(_) and
22-
what = "class '" + x.getName() + "'"
23-
)
24-
or
25-
not t instanceof ClassValue and
26-
what = "instance of '" + c.getName() + "'"
27-
)
28-
29-
select ex.getNode(), "Non-exception $@ in exception handler which will never match raised exception.", origin, what
30-
17+
where
18+
ex.handledException(t, c, origin) and
19+
(
20+
exists(ClassValue x | x = t |
21+
not x.isLegalExceptionType() and
22+
not x.failedInference(_) and
23+
what = "class '" + x.getName() + "'"
24+
)
25+
or
26+
not t instanceof ClassValue and
27+
what = "instance of '" + c.getName() + "'"
28+
)
29+
select ex.getNode(),
30+
"Non-exception $@ in exception handler which will never match raised exception.", origin, what

0 commit comments

Comments
 (0)