py-topdir.mk: Add --config pyproject.toml

ruff tries to recursivley use every config file it finds and stumbles over a template:

/usr/bin/ruff check --select TC,FA --fix --unsafe-fixes . ruff failed Cause: Failed to parse /home/jan/local/src/jw.dev/proj/jw-pkg/conf/templates/pyproject.toml Cause: TOML parse error at line 3, column 3 | 3 | {mypypath} | ^ invalid key-value pair, expected key

Limiting it to the toplevel pyproject.toml by explicitly specifying --config fixes the behaviour, so that's what this commit does.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-05 14:19:23 +02:00
commit 9ba6c70dee
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -7,6 +7,9 @@ endif
ifndef PY_CHECK_RUFF ifndef PY_CHECK_RUFF
PY_CHECK_RUFF := $(shell which ruff 2>/dev/null) PY_CHECK_RUFF := $(shell which ruff 2>/dev/null)
ifneq ($(PY_CHECK_RUFF),)
PY_CHECK_RUFF += --config pyproject.toml
endif
endif endif
ifndef PY_CHECK_YAPF ifndef PY_CHECK_YAPF