chore(coverage): configure coverage tooling to handle unreachable code properly#1610
chore(coverage): configure coverage tooling to handle unreachable code properly#1610kings9527 wants to merge 3 commits into
Conversation
…e properly Configure coverage.py exclude_also patterns for standard unreachable code paths (TYPE_CHECKING, NotImplementedError, AssertionError, Protocol classes, abstract methods, __repr__, if __name__ == '__main__'). Add 'tests/' to coverage source so dead code in test helpers is visible. Add tests/ flag to Codecov with 100% target to catch dead test code early. Annotate existing unreachable/functional-test-only paths with explicit pragma comments instead of relying on implicit branch coverage gaps. Fixes aio-libs#1490
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
|
Thanks for the contribution! Automated Claude review is disabled on fork PRs because GitHub Actions restricts the OIDC token on them. A maintainer can trigger a review by commenting |
Align the '- tests/' list item with 'paths:' key (6 spaces) instead of over-indenting to 8 spaces. Matches the existing indentation style used throughout the rest of the file. Fixes CI failure: wrong indentation: expected 6 but found 8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1610 +/- ##
==========================================
+ Coverage 93.83% 94.18% +0.34%
==========================================
Files 81 81
Lines 8440 8388 -52
==========================================
- Hits 7920 7900 -20
+ Misses 520 488 -32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@claude review |
|
Claude finished @thehesiod's task in 3m 57s —— View job Review complete
The direction of this PR is right — using Medium: Comment-text patterns in
|
|
@kings9527 what do you think of the review? |
|
Thanks for the review, @thehesiod. The points from @claude are solid—I'll address all three:
Will push a follow-up commit shortly. |
|
To clarify the three items from the review above (the backticks got mangled in the first comment):
|
- Remove fragile comment-text patterns from exclude_also (redundant with pragma annotations) - Remove redundant pragma entries from exclude_also (handled natively by coverage.py) - Fix Codecov tests: block placement under project: instead of status sibling
|
Pushed the fixes in :
Ready for another look. |
Configure coverage.py exclude_also patterns for standard unreachable code paths (TYPE_CHECKING, NotImplementedError, AssertionError, Protocol classes, abstract methods, repr, if name == 'main').
Add 'tests/' to coverage source so dead code in test helpers is visible.
Add tests/ flag to Codecov with 100% target to catch dead test code early.
Annotate existing unreachable/functional-test-only paths with explicit pragma comments instead of relying on implicit branch coverage gaps.
Fixes #1490