Skip to content

Commit

Permalink
Tell coveragepy to ignore type checking code and ...
Browse files Browse the repository at this point in the history
This is so we can get a more accurate picture of coverage.

For more info see:
- nedbat/coveragepy#831
  • Loading branch information
aucampia committed Apr 19, 2022
1 parent e9f5c22 commit 10b1261
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# TYPE_CHECKING guarded code only affects type checkers.
^ +if (False|TYPE_CHECKING):
# constant used in protocols and abstract methods, does not run anything
# and has no side effects.
^ +\.\.\.$

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
Expand Down

0 comments on commit 10b1261

Please sign in to comment.