Skip to content

Commit 5cab8c9

Browse files
TuTomaszrkorsakAddressXceptionkeithrfung
authored
Created method to reformat with black prior to linting. (#185)
Co-authored-by: Ryan Korsak <[email protected]> Co-authored-by: Matt Wilhelm <[email protected]> Co-authored-by: Keith Fung <[email protected]>
1 parent 91338d5 commit 5cab8c9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all bench environment install install-mac install-linux install-windows lint validate test test-example coverage coverage-html coverage-xml coverage-erase generate-sample-data
1+
.PHONY: all bench environment install install-mac install-linux install-windows auto-lint validate test test-example coverage coverage-html coverage-xml coverage-erase generate-sample-data
22

33
CODE_COVERAGE ?= 90
44
WINDOWS_32BIT_GMPY2 ?= packages/gmpy2-2.0.8-cp38-cp38-win32.whl
@@ -8,7 +8,7 @@ IS_64_BIT ?= $(shell python -c 'from sys import maxsize; print(maxsize > 2**32)'
88
SAMPLE_BALLOT_COUNT ?= 5
99
SAMPLE_BALLOT_SPOIL_RATE ?= 50
1010

11-
all: environment install validate lint coverage
11+
all: environment install validate auto-lint coverage
1212

1313
bench:
1414
@echo 📊 BENCHMARKS
@@ -63,7 +63,12 @@ ifeq ($(IS_64_BIT), False)
6363
pipenv run python -m pip install -f $(WINDOWS_32BIT_GMPY2) -e .
6464
endif
6565

66-
66+
auto-lint:
67+
@echo 💚 AUTO LINT
68+
@echo Reformatting using Black
69+
pipenv run black .
70+
make lint
71+
6772
lint:
6873
@echo 💚 LINT
6974
@echo 1.Pylint

0 commit comments

Comments
 (0)