From ed2d8720aa5fe49f930f62a62e5d33d0f39e0390 Mon Sep 17 00:00:00 2001 From: Zihao Xu Date: Mon, 19 Jan 2026 04:46:42 -0800 Subject: [PATCH] chore: configure coverage settings in pyproject.toml (#51) - Add [tool.coverage.run] with source and branch coverage - Add [tool.coverage.report] with exclude patterns and show_missing Closes #43 --- pyproject.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7b42f29..29b7706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,21 @@ testpaths = ["tests"] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" norecursedirs = ["tmp", "assets", "node_modules", "dist", "build", "web", "tools"] + +[tool.coverage.run] +source = ["src"] +branch = true +omit = [ + "src/__pycache__/*", + "src/*/__pycache__/*", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", +] +show_missing = true