-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tests): Do not include type checking code in coverage report #3327
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3327 +/- ##
==========================================
+ Coverage 79.49% 79.75% +0.25%
==========================================
Files 133 133
Lines 14307 14285 -22
Branches 3009 3001 -8
==========================================
+ Hits 11374 11393 +19
+ Misses 2089 2070 -19
+ Partials 844 822 -22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Didn't know this was possible.
[tool.coverage.report] | ||
exclude_also = [ | ||
"if TYPE_CHECKING:", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newline at the end of the file here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this change, I hope it helps us get more accurate coverage reports!
…tsentry#3327) This should not count lines (or rather if blocks) that start with if TYPE_CHECKING in the code coverage report, because this code is only evaluated when checking types with mypy.
This should not count lines (or rather if blocks) that start with
if TYPE_CHECKING
in the code coverage report, because this code is only evaluated when checking types with mypy.