Skip to content

Commit

Permalink
[ci] skip TYPE_CHECKING blocks in code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 22, 2024
1 parent 8eccd01 commit dd99fe1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,13 @@ test-data-conda-dot-conda-packages:
test:
pytest \
--cov pydistcheck \
--cov-fail-under=98 \
./tests

.PHONY: test-local
test-local:
PYTHONPATH=src \
pytest \
--cov=src/pydistcheck \
--cov-fail-under=98 \
--cov-report="term" \
--cov-report="html:htmlcov" \
./tests
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ requires = [
]
build-backend = "setuptools.build_meta"

[tool.coverage.report]
fail_under = 98.00
exclude_also = [
# skip type-checking blocks when calculating code coverage
"if TYPE_CHECKING:"
]

[tool.isort]
line_length = 88
profile = "black"
Expand Down

0 comments on commit dd99fe1

Please sign in to comment.