From 18f1c580f1ee34dfe29f5945aab45a2d96b75b91 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 11 Sep 2026 14:38:51 +0200 Subject: [PATCH] py-topdir.mk: Add test tree to default check roots PY_CHECK_ROOTS defaults to the src and tools directories, so the ruff, mypy, pyright, and yapf checks and the bad-pattern scan silently skip test trees. Python tests below test/ therefore escape linting, type checking, and formatting enforcement, even though py-check.mk itself defaults to the whole directory when no roots are given at all. Add $(TOPDIR)/test to the default PY_CHECK_ROOTS after the build is through, so that the test tree receives the same checks and formatting as src and tools. The previous commit prepared this repo's unit tests for the strict type check and the formatter, so the extended roots pass cleanly here. Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 --- make/py-topdir.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make/py-topdir.mk b/make/py-topdir.mk index c6b0f3ac..75d95b50 100644 --- a/make/py-topdir.mk +++ b/make/py-topdir.mk @@ -9,6 +9,9 @@ MYPY_PATH_DIRECTIVE = mypy_path = "$(MYPY_CONFIG_PATH)" ifndef PY_CHECK_ROOTS PY_CHECK_ROOTS = $(wildcard $(TOPDIR)/src $(TOPDIR)/tools) + ifneq ($(wildcard dirs-all.done),) + PY_CHECK_ROOTS += $(wildcard $(TOPDIR)/test) + endif endif all: