Skip to content

Commit

Permalink
Tell coverage tool to ignore lines intended for mypy only
Browse files Browse the repository at this point in the history
In particular, `if TYPE_CHECKING:` blocks and `...` in bodies of
overloaded method definitions.
  • Loading branch information
mthuurne committed Jun 14, 2024
1 parent 5fc37eb commit 9dc2247
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[run]
include = model_utils/*.py

[report]
exclude_also =
# Exclusive to mypy:
if TYPE_CHECKING:$
\.\.\.$

0 comments on commit 9dc2247

Please sign in to comment.