From 045002c6fb0c6b5adbfbccc045358e6c0b669e43 Mon Sep 17 00:00:00 2001 From: Sridhar Ramaswamy Date: Sun, 8 Sep 2024 21:53:48 -0700 Subject: [PATCH 1/2] Add lint-fix target --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index b2dbf300..3b84bef4 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,10 @@ lint: ruff check --select I . mkdir -p $(MYPY_CACHE) && mypy --install-types --non-interactive $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) --exclude build/ --exclude pebblo_saferetriever --check-untyped-defs || true +lint-fix: + ruff check . --fix + ruff format + spell_check: codespell --toml pyproject.toml From 5995d67a9baad6138e24330308c70cee2d3e467a Mon Sep 17 00:00:00 2001 From: Sridhar Ramaswamy Date: Mon, 9 Sep 2024 08:23:54 -0700 Subject: [PATCH 2/2] Remove redundant lint lines --- Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Makefile b/Makefile index 3b84bef4..8450dcbb 100644 --- a/Makefile +++ b/Makefile @@ -46,10 +46,6 @@ lint: ruff check --select I . mkdir -p $(MYPY_CACHE) && mypy --install-types --non-interactive $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) --exclude build/ --exclude pebblo_saferetriever --check-untyped-defs || true -lint-fix: - ruff check . --fix - ruff format - spell_check: codespell --toml pyproject.toml @@ -64,7 +60,6 @@ format_diff: PYTHON_FILES=$(shell git diff --relative= --name-only --diff-filter format format_diff: [ "$(PYTHON_FILES)" = "" ] || ruff check $(PYTHON_FILES) --fix [ "$(PYTHON_FILES)" = "" ] || ruff format $(PYTHON_FILES) - [ "$(PYTHON_FILES)" = "" ] || ruff check --select I --fix $(PYTHON_FILES) ################################################ # HELP