Skip to content

Commit

Permalink
CLN: move coverage config to pyproject.toml (pandas-dev#49879)
Browse files Browse the repository at this point in the history
* CLN: move coverage config to pyproject.toml

* space
  • Loading branch information
fangchenli authored and mliu08 committed Nov 27, 2022
1 parent f3fd612 commit 4069cd8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 35 deletions.
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,32 @@ reportOptionalOperand = false
reportOptionalSubscript = false
reportPrivateImportUsage = false
reportUnboundVariable = false

[tool.coverage.run]
branch = true
omit = ["pandas/_typing.py", "pandas/_version.py"]
plugins = ["Cython.Coverage"]
source = ["pandas"]

[tool.coverage.report]
ignore_errors = false
show_missing = true
omit = ["pandas/_version.py"]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:s
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"AbstractMethodError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[tool.coverage.html]
directory = "coverage_html_report"
35 changes: 0 additions & 35 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -287,38 +287,3 @@ exclude =
[codespell]
ignore-words-list = blocs,coo,hist,nd,sav,ser,recuse
ignore-regex = https://([\w/\.])+

[coverage:run]
branch = True
omit =
pandas/_typing.py
pandas/_version.py
plugins = Cython.Coverage
source = pandas

[coverage:report]
ignore_errors = False
show_missing = True
omit =
pandas/_version.py
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
AbstractMethodError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
if TYPE_CHECKING:

[coverage:html]
directory = coverage_html_report

0 comments on commit 4069cd8

Please sign in to comment.