From 3a54f651848e3b7ea52da761a4afd26184efdab5 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Sun, 14 Apr 2024 20:07:40 +0000 Subject: [PATCH] Add overload coverage exemption --- .coveragerc | 20 -------------------- pyproject.toml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 20 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index a511e9b60..000000000 --- a/.coveragerc +++ /dev/null @@ -1,20 +0,0 @@ -[report] -fail_under = 60 -exclude_lines = - if TYPE_CHECKING: - pragma: no cover - def __repr__ - raise AssertionError - raise NotImplementedError - if __name__ == .__main__.: - if sys.version_info - class .*\(.*(Error|Exception)\): - ^ *\.\.\.$ - -[run] -branch = true -omit = - tests/data/* - tests/util/* - .* - venv/* diff --git a/pyproject.toml b/pyproject.toml index 28a0aea8c..7376cf473 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -141,6 +141,30 @@ warn_required_dynamic_aliases = true in-place = true remove-all-unused-imports = true +[tool.coverage.report] +fail_under = 60 +exclude_lines = [ + "@overload", + "if TYPE_CHECKING:", + "pragma: no cover", + "def __repr__", + "raise AssertionError", + "raise NotImplementedError", + 'if __name__ == .__main__.:', + "if sys.version_info", + 'class .*\(.*(Error|Exception)\):', + '^ *\.\.\.$', +] + +[tool.coverage.run] +branch = true +omit = [ + "tests/data/*", + "tests/util/*", + ".*", + "venv/*", +] + [tool.commitizen] name = "cz_conventional_commits" tag_format = "v$version"