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