Skip to content

Commit 3a54f65

Browse files
committed
Add overload coverage exemption
1 parent e06b906 commit 3a54f65

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

.coveragerc

Lines changed: 0 additions & 20 deletions
This file was deleted.

pyproject.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,30 @@ warn_required_dynamic_aliases = true
141141
in-place = true
142142
remove-all-unused-imports = true
143143

144+
[tool.coverage.report]
145+
fail_under = 60
146+
exclude_lines = [
147+
"@overload",
148+
"if TYPE_CHECKING:",
149+
"pragma: no cover",
150+
"def __repr__",
151+
"raise AssertionError",
152+
"raise NotImplementedError",
153+
'if __name__ == .__main__.:',
154+
"if sys.version_info",
155+
'class .*\(.*(Error|Exception)\):',
156+
'^ *\.\.\.$',
157+
]
158+
159+
[tool.coverage.run]
160+
branch = true
161+
omit = [
162+
"tests/data/*",
163+
"tests/util/*",
164+
".*",
165+
"venv/*",
166+
]
167+
144168
[tool.commitizen]
145169
name = "cz_conventional_commits"
146170
tag_format = "v$version"

0 commit comments

Comments
 (0)