From 170afd74599a4bb219798ecd4a5e33154786471c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 25 Apr 2026 22:18:27 +0100 Subject: [PATCH 1/2] Include ci/ in coverage source Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4ef7618a7..63b0eeac3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -374,7 +374,7 @@ run.omit = [ "src/mock_vws/_flask_server/healthcheck.py", ] run.parallel = true -run.source = [ "src/", "tests/" ] +run.source = [ "ci/", "src/", "tests/" ] report.exclude_also = [ "class .*\\bProtocol\\):", "if TYPE_CHECKING:", From 3326f05f44c1dc1022d5352880f6cca1f9fab9bd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 26 Apr 2026 07:42:37 +0100 Subject: [PATCH 2/2] Use setdefault to collect patterns per test Co-Authored-By: Claude Opus 4.7 (1M context) --- ci/test_custom_linters.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/test_custom_linters.py b/ci/test_custom_linters.py index 4911e8fd9..77ff03cb1 100644 --- a/ci/test_custom_linters.py +++ b/ci/test_custom_linters.py @@ -103,10 +103,7 @@ def test_tests_collected_once(request: pytest.FixtureRequest) -> None: for pattern in ci_patterns: tests = _tests_from_pattern(ci_pattern=pattern) for test in tests: - if test in tests_to_patterns: - tests_to_patterns[test].add(pattern) - else: - tests_to_patterns[test] = {pattern} + tests_to_patterns.setdefault(test, set()).add(pattern) for test_name, patterns in tests_to_patterns.items(): message = (