From b623730dcefd851f2e74e87279f9084331f33ff5 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 24 Nov 2023 01:48:27 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=9A=9A=20switch=20to=20tool?= =?UTF-8?q?=20table=20config=20for=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://coverage.readthedocs.io/en/latest/config.html#sample-file Signed-off-by: Matthew Hoffman --- .coveragerc | 11 ----------- pyproject.toml | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 00a8a07a912..00000000000 --- a/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[report] -exclude_lines = - pragma: no cover - if TYPE_CHECKING: - if typing.TYPE_CHECKING: - if __name__ == .__main__.: - class .*\(.*Protocol.*\): - @overload - @abstractmethod - @abc.abstractmethod - raise NotImplementedError diff --git a/pyproject.toml b/pyproject.toml index e5598c2aff5..e50c9b1800d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,17 @@ markers = [ "sandbox_test: fake integration tests", ] +[tool.coverage.report] +exclude_also = [ + "def __repr__", + "pragma: no cover", + "if __name__ == .__main__.:", + "if (typing\\.)?TYPE_CHECKING:", + "@(typing\\.)?overload", + "@(abc\\.)?abstractmethod", + "raise NotImplementedError", +] + [tool.coverage.run] branch = true