mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Merge pull request #18738 from github/tausbn/python-fix-match-pruning-logic
Python: Don't prune any `MatchLiteralPattern`s
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
category: fix
|
||||
---
|
||||
|
||||
- `MatchLiteralPattern`s such as `case None: ...` are now never pruned from the extracted source code. This fixes some situations where code was wrongly identified as unreachable.
|
||||
@@ -4,6 +4,3 @@
|
||||
| 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:158:9:159:16 | Case | This statement is unreachable. |
|
||||
| test.py:162:13:162:16 | Pass | This statement is unreachable. |
|
||||
| test.py:167:13:167:16 | Pass | This statement is unreachable. |
|
||||
|
||||
Reference in New Issue
Block a user