Skip to content

Commit 0d9a76c

Browse files
committed
ci(coverage): Ignore code directives, docs/conf.py
1 parent 98316eb commit 0d9a76c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,25 @@ filterwarnings = [
189189
django_find_project = false
190190
DJANGO_SETTINGS_MODULE = 'tests.settings'
191191

192+
[tool.coverage.run]
193+
omit = [
194+
"docs/conf.py",
195+
]
196+
197+
[tool.coverage.report]
198+
exclude_also = [
199+
"def __repr__",
200+
"if self.debug:",
201+
"if settings.DEBUG",
202+
"raise AssertionError",
203+
"raise NotImplementedError",
204+
"if 0:",
205+
"if __name__ == .__main__.:",
206+
"if TYPE_CHECKING:",
207+
"class .*\\bProtocol\\):",
208+
"@(abc\\.)?abstractmethod",
209+
]
210+
192211
[build-system]
193212
requires = ["poetry_core>=1.0.0", "poetry>=1.1.12"]
194213
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)