From 426bdd23494491f6afc93afdc4e0c9725b1ef3a3 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 4 Jan 2024 12:31:06 +0100 Subject: [PATCH] update Makefile --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 567c3670d..a0628e0fe 100644 --- a/Makefile +++ b/Makefile @@ -194,10 +194,10 @@ test-coverage: ## Run test coverage. # =================================================================== ruff: ## Run ruff linter. - @git ls-files '*.py' | xargs $(PYTHON) -m ruff check --config=pyproject.toml --no-cache + @git ls-files '*.py' | xargs $(PYTHON) -m ruff check --no-cache black: ## Python files linting (via black) - @git ls-files '*.py' | xargs $(PYTHON) -m black --config=pyproject.toml --check --safe + @git ls-files '*.py' | xargs $(PYTHON) -m black --check --safe _pylint: ## Python pylint (not mandatory, just run it from time to time) @git ls-files '*.py' | xargs $(PYTHON) -m pylint --rcfile=pyproject.toml --jobs=${NUM_WORKERS} @@ -212,6 +212,7 @@ lint-toml: ## Linter for pyproject.toml @git ls-files '*.toml' | xargs toml-sort --check lint-all: ## Run all linters + ${MAKE} black ${MAKE} ruff ${MAKE} lint-c ${MAKE} lint-rst @@ -221,11 +222,11 @@ lint-all: ## Run all linters # Fixers # =================================================================== -fix-ruff: - @git ls-files '*.py' | xargs $(PYTHON) -m ruff --config=pyproject.toml --no-cache --fix - fix-black: - git ls-files '*.py' | xargs $(PYTHON) -m black --config=pyproject.toml + git ls-files '*.py' | xargs $(PYTHON) -m black + +fix-ruff: + @git ls-files '*.py' | xargs $(PYTHON) -m ruff --no-cache --fix fix-unittests: ## Fix unittest idioms. @git ls-files '*test_*.py' | xargs $(PYTHON) -m teyit --show-stats @@ -235,6 +236,7 @@ fix-toml: ## Fix pyproject.toml fix-all: ## Run all code fixers. ${MAKE} fix-ruff + ${MAKE} fix-black ${MAKE} fix-unittests ${MAKE} fix-toml