Commit e1d712d
committed
refactor: unify respond() call after if/else to avoid 3.14 phantom trace
Python 3.14's compiler attributes the async trampoline's CLEANUP_THROW
instructions (for the try-body's await) to the next physical line of
code, which was the else body. coverage.py traced a phantom line event
there, tripping strict-no-cover even though the else never runs.
Moving the try/respond after the if/else avoids the misattribution and
also deduplicates the two respond() calls.1 parent 36a974a commit e1d712d
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | 492 | | |
502 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
| |||
0 commit comments