Skip to content

Commit 10b1261

Browse files
committed
Tell coveragepy to ignore type checking code and ...
This is so we can get a more accurate picture of coverage. For more info see: - coveragepy/coveragepy#831
1 parent e9f5c22 commit 10b1261

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ exclude_lines =
1616
# Have to re-enable the standard pragma
1717
pragma: no cover
1818

19+
# TYPE_CHECKING guarded code only affects type checkers.
20+
^ +if (False|TYPE_CHECKING):
21+
# constant used in protocols and abstract methods, does not run anything
22+
# and has no side effects.
23+
^ +\.\.\.$
24+
1925
# Don't complain if non-runnable code isn't run:
2026
if 0:
2127
if __name__ == .__main__.:

0 commit comments

Comments
 (0)