When using pants for code coverage, I see in the d...
# general
m
When using pants for code coverage, I see in the docs that filter is used to specify which files SHOULD be included. Is there a way to instead list files that should NOT be included (like #pragma: no cover)? Any good example repos that utilize the coverage filter?
1
r
You can try using
omit
if you use some custom config file https://coverage.readthedocs.io/en/stable/source.html#source
We use pyproject.toml and it looks something like this
Copy code
[tool.coverage.run]
omit = ["*/tests/*"]

[tool.coverage.report]
skip_empty = true
m
Going to try something like that, thank you!