Commit 54e817e
committed
codeql: suppress py/ineffectual-statement (false positives)
Adds ``.github/codeql/codeql-config.yml`` with a query-filter
exclude for ``py/ineffectual-statement``. The rule has produced
zero true positives across the codebase; every finding has been
the same false-positive pattern:
- PEP 544 ``Protocol`` method bodies (``...``) on the eight
Protocol classes the framework defines (``Provider``,
``Checkpointer``, ``Middleware``, ``Observer``, etc.). Canonical
Python idiom — never executed.
- ``await worker`` lines flagged as no-effect when ``await`` on
a task is the entire mechanism that waits for the task to
complete (CodeQL bug on async patterns).
The genuine "unused statement" cases are caught at type-check time
by pyright's ``reportUnusedExpression`` — suppressing the CodeQL
rule doesn't lose any signal.
To make GitHub's default-setup code scanning honor this config:
Settings → Code security → Code scanning → CodeQL default setup →
"Custom configuration" → point at
``.github/codeql/codeql-config.yml``. (Or switch to advanced
setup; the file works either way once selected.)1 parent d010d9b commit 54e817e
1 file changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments