Skip to content

Commit

Permalink
gh-278: ignore reduandant lines and files from coverage report (#279)
Browse files Browse the repository at this point in the history
Adds coverage config in pyproject.toml to ignore VCS produced files and
conditional code meant for type checking.

Closes: #278

---------

Co-authored-by: Patrick J. Roddy <[email protected]>
  • Loading branch information
Saransh-cpp and paddyroddy authored Sep 25, 2024
1 parent f821e64 commit ef1f165
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ Documentation = "https://glass.readthedocs.io/"
Homepage = "https://github.com/glass-dev/glass"
Issues = "https://github.com/glass-dev/glass/issues"

[tool.coverage]
report = {exclude_also = [
"if TYPE_CHECKING:",
], omit = [
"glass/_version.py",
]}

[tool.hatch]
build.hooks.vcs.version-file = "glass/_version.py"
version.source = "vcs"
Expand Down

0 comments on commit ef1f165

Please sign in to comment.