Skip to content

Commit

Permalink
better coverage config
Browse files Browse the repository at this point in the history
- exclude e.g. tests
- include files not imported at all
- exclude some common patterns (see https://coverage.readthedocs.io/en/7.4.1/excluding.html#excluding-source-files)
  • Loading branch information
catwell committed Jan 29, 2024
1 parent 19bc081 commit 1eb5c77
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ reportMissingTypeStubs = "warning"

[tool.coverage.run]
branch = true
source = ["src/refiners"]

# Also apply to HTML output, where appropriate
[tool.coverage.report]
ignore_errors = true # see `build-html-cov` for details
exclude_also = [
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]

0 comments on commit 1eb5c77

Please sign in to comment.