better coverage config

- 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)
This commit is contained in:
Pierre Chapuis 2024-01-29 18:35:02 +01:00
parent 19bc081658
commit 1eb5c779de

View file

@ -107,7 +107,15 @@ reportMissingTypeStubs = "warning"
[tool.coverage.run] [tool.coverage.run]
branch = true branch = true
source = ["src/refiners"]
# Also apply to HTML output, where appropriate # Also apply to HTML output, where appropriate
[tool.coverage.report] [tool.coverage.report]
ignore_errors = true # see `build-html-cov` for details ignore_errors = true # see `build-html-cov` for details
exclude_also = [
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]