mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: tests with false positives around match
This commit is contained in:
@@ -4,3 +4,5 @@
|
||||
| test.py:21:5:21:38 | For | This statement is unreachable. |
|
||||
| test.py:28:9:28:21 | ExprStmt | This statement is unreachable. |
|
||||
| test.py:84:5:84:21 | ExceptStmt | This statement is unreachable. |
|
||||
| test.py:144:13:144:16 | Pass | This statement is unreachable. |
|
||||
| test.py:147:9:148:16 | Case | This statement is unreachable. |
|
||||
|
||||
@@ -137,3 +137,12 @@ def unreachable_catch_all_raise(x):
|
||||
pass
|
||||
else:
|
||||
raise ValueError(x)
|
||||
|
||||
def ok_match(x):
|
||||
match x:
|
||||
case False:
|
||||
pass # FP
|
||||
case True:
|
||||
pass
|
||||
case _: # FP
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user