Skip to content

Commit

Permalink
Fix Makefile typo, avoid printing long command line (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper authored Dec 21, 2023
1 parent 63db8a5 commit 576ffef
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all:
$(error please pick a target)

# We only want to format and lint checked in python files
CHECKED_IN_PYTHING_FILES := $(shell git ls-files | grep '\.py$$')
CHECKED_IN_PYTHON_FILES := $(shell git ls-files | grep '\.py$$')

FLAKE8_OPTIONS := --max-line-length 120 --extend-ignore E203,W503
BLACK_OPTIONS := --line-length 120
Expand All @@ -26,22 +26,24 @@ ISORT_OPTIONS := --profile black
.PHONY: fmt
fmt:
@echo "Running black fmt..."
python -m black $(BLACK_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
python -m isort $(ISORT_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@python -m black $(BLACK_OPTIONS) $(CHECKED_IN_PYTHON_FILES)
@echo "Running isort..."
@python -m isort $(ISORT_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: lint
lint: flake8 fmt-check

.PHONY: fmt-check
fmt-check:
@echo "Running black+isort fmt check..."
python -m black $(BLACK_OPTIONS) --check --diff $(CHECKED_IN_PYTHING_FILES)
python -m isort --check --diff $(ISORT_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@echo "Running black check..."
@python -m black $(BLACK_OPTIONS) --check --diff $(CHECKED_IN_PYTHON_FILES)
@echo "Running isort check..."
@python -m isort --check --diff $(ISORT_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: flake8
flake8:
@echo "Running flake8 lint..."
python -m flake8 $(FLAKE8_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@python -m flake8 $(FLAKE8_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: test
test:
Expand Down

0 comments on commit 576ffef

Please sign in to comment.