Skip to content

Commit 4069cd8

Browse files
fangchenlimliu08
authored andcommitted
CLN: move coverage config to pyproject.toml (pandas-dev#49879)
* CLN: move coverage config to pyproject.toml * space
1 parent f3fd612 commit 4069cd8

File tree

2 files changed

+29
-35
lines changed

2 files changed

+29
-35
lines changed

pyproject.toml

+29
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,32 @@ reportOptionalOperand = false
306306
reportOptionalSubscript = false
307307
reportPrivateImportUsage = false
308308
reportUnboundVariable = false
309+
310+
[tool.coverage.run]
311+
branch = true
312+
omit = ["pandas/_typing.py", "pandas/_version.py"]
313+
plugins = ["Cython.Coverage"]
314+
source = ["pandas"]
315+
316+
[tool.coverage.report]
317+
ignore_errors = false
318+
show_missing = true
319+
omit = ["pandas/_version.py"]
320+
exclude_lines = [
321+
# Have to re-enable the standard pragma
322+
"pragma: no cover",
323+
# Don't complain about missing debug-only code:s
324+
"def __repr__",
325+
"if self.debug",
326+
# Don't complain if tests don't hit defensive assertion code:
327+
"raise AssertionError",
328+
"raise NotImplementedError",
329+
"AbstractMethodError",
330+
# Don't complain if non-runnable code isn't run:
331+
"if 0:",
332+
"if __name__ == .__main__.:",
333+
"if TYPE_CHECKING:",
334+
]
335+
336+
[tool.coverage.html]
337+
directory = "coverage_html_report"

setup.cfg

-35
Original file line numberDiff line numberDiff line change
@@ -287,38 +287,3 @@ exclude =
287287
[codespell]
288288
ignore-words-list = blocs,coo,hist,nd,sav,ser,recuse
289289
ignore-regex = https://([\w/\.])+
290-
291-
[coverage:run]
292-
branch = True
293-
omit =
294-
pandas/_typing.py
295-
pandas/_version.py
296-
plugins = Cython.Coverage
297-
source = pandas
298-
299-
[coverage:report]
300-
ignore_errors = False
301-
show_missing = True
302-
omit =
303-
pandas/_version.py
304-
# Regexes for lines to exclude from consideration
305-
exclude_lines =
306-
# Have to re-enable the standard pragma
307-
pragma: no cover
308-
309-
# Don't complain about missing debug-only code:
310-
def __repr__
311-
if self\.debug
312-
313-
# Don't complain if tests don't hit defensive assertion code:
314-
raise AssertionError
315-
raise NotImplementedError
316-
AbstractMethodError
317-
318-
# Don't complain if non-runnable code isn't run:
319-
if 0:
320-
if __name__ == .__main__.:
321-
if TYPE_CHECKING:
322-
323-
[coverage:html]
324-
directory = coverage_html_report

0 commit comments

Comments
 (0)