Skip to content

Commit a7f6539

Browse files
committed
Port .coveragerc to pyproject.toml
1 parent 8a37d87 commit a7f6539

2 files changed

Lines changed: 21 additions & 22 deletions

File tree

.coveragerc

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

pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,24 @@ addopts = [ "-ra", "--color=auto" ]
204204
testpaths = [
205205
"Tests",
206206
]
207+
208+
[tool.coverage]
209+
run.omit = [
210+
"checks/*.py",
211+
"Tests/createfontdatachunk.py",
212+
]
213+
report.exclude_also = [
214+
"@abc.abstractmethod",
215+
"^\\s*\\.\\.\\.(\\s*#.*)?$",
216+
# Empty bodies in protocols or abstract methods
217+
"^\\s*def [a-zA-Z0-9_]+\\(.*\\)(\\s*->.*)?:\\s*\\.\\.\\.(\\s*#.*)?$",
218+
# Don't complain about compatibility code for missing optional dependencies
219+
"except ImportError",
220+
"if __name__ == .__main__.:",
221+
# Don't complain if non-runnable code isn't run
222+
"if 0:",
223+
# Don't complain about debug code
224+
"if DEBUG:",
225+
# Don't complain about code that generally isn't run
226+
"if TYPE_CHECKING:",
227+
]

0 commit comments

Comments
 (0)