Skip to content

Commit cc8f655

Browse files
committed
Add overload coverage exemption
1 parent 8e19fb0 commit cc8f655

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
@@ -145,6 +145,30 @@ warn_required_dynamic_aliases = true
145145
in-place = true
146146
remove-all-unused-imports = true
147147

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

0 commit comments

Comments
 (0)