Commit 85fc9d0
committed
codeql: also suppress py/unused-import false positives
Same false-positive pattern as the prior ``py/ineffectual-statement``
exclusion — three cases CodeQL flags but isn't actually right about:
- Forward-reference casts (``cast("FinishReason", x)``,
``cast("Checkpointer", capturing)``). The string argument isn't
parsed by CodeQL but pyright resolves it; removing the import
yields ``reportUndefinedVariable``.
- Subscripted base classes (``class T(FanOutNode[State, State]):``)
— the base class IS used.
- Re-exports for public API.
Pyright's ``reportUnusedImport`` covers the genuine cases at
type-check time; the CodeQL rule duplicates with a worse FP rate.1 parent bfb5838 commit 85fc9d0
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments