Skip to content

Commit 811bab2

Browse files
committed
Omit 'if TYPE_CHECKING' blocks from coverage
These blocks only exist to create code which evaluates under mypy but does not run at runtime. As a result, they are impossible to cover with `coverage` on a testsuite, and make sense to exclude from coverage reporting.
1 parent cdc2807 commit 811bab2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
branch = True
44
source = jsonschema
55
omit = */jsonschema/_reflect.py,*/jsonschema/__main__.py,*/jsonschema/benchmarks/*,*/jsonschema/tests/fuzz_validate.py
6+
7+
[report]
8+
exclude_lines =
9+
if TYPE_CHECKING:

0 commit comments

Comments
 (0)