-
Notifications
You must be signed in to change notification settings - Fork 83
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
test: Ignore TYPE_CHECKING for coverage #1937
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matthewfeickert
approved these changes
Aug 12, 2022
matthewfeickert
changed the title
feat: Ignore TYPE_CHECKING for coverage
test: Ignore TYPE_CHECKING for coverage
Aug 12, 2022
Codecov Report
@@ Coverage Diff @@
## master #1937 +/- ##
==========================================
+ Coverage 98.19% 98.23% +0.04%
==========================================
Files 68 68
Lines 4365 4363 -2
Branches 734 733 -1
==========================================
Hits 4286 4286
+ Misses 46 45 -1
+ Partials 33 32 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
4 tasks
This was referenced Aug 12, 2022
matthewfeickert
added a commit
that referenced
this pull request
Aug 12, 2022
…ing (#1942) * Use string literal types of generic builtins for type checking until Python 3.8 support is dropped (so pyhf is Python 3.9+ only) to avoid having to check for `if typing.TYPE_CHECKING`. - c.f. https://mypy.readthedocs.io/en/stable/runtime_troubles.html#string-literal-types - c.f. https://mypy.readthedocs.io/en/stable/builtin_types.html#generic-types - c.f. https://mypy.readthedocs.io/en/stable/runtime_troubles.html#generic-builtins - c.f. https://peps.python.org/pep-0585/ * Remove .coveragerc as no longer needed. - Reverts PR #1937
kratsg
added a commit
that referenced
this pull request
Aug 23, 2022
* Add .coveragerc file with configuration to ignore TYPE_CHECKING. - ref: https://coverage.readthedocs.io/en/6.4.3/excluding.html#advanced-exclusion
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
As introduced in #1909, we had a drop in coverage due to the
TYPE_CHECKING
blocks. We'll ignore it to fix coverage as those blocks aren't meant to be seen during runtime.Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: