diff --git a/make/py-topdir.mk b/make/py-topdir.mk index 377bad28..817a740b 100644 --- a/make/py-topdir.mk +++ b/make/py-topdir.mk @@ -45,6 +45,16 @@ py-format-assignments: -execdir /usr/bin/sed -i 's/^\(\s\+[a-zA-Z0-9_]\+\)=\([^,[:space:]]\+\)\([,(]\)*\s*$$/\1 = \2\3/g' {} '+' git diff --exit-code +py-check-annotation-imports: +ifneq ($(PY_CHECK_RUFF),) + $(PY_CHECK_RUFF) check --select TC,FA --diff --unsafe-fixes . +endif + +py-format-annotation-imports: +ifneq ($(PY_CHECK_RUFF),) + $(PY_CHECK_RUFF) check --select TC,FA --fix --unsafe-fixes . +endif + clean.topdir: clean.py-check clean.py-check: rm -rf .mypy_cache