Add yapf for automatic code formatting

This commit is contained in:
Matt Weiden
2019-12-19 15:19:22 -08:00
parent 176ea3bc91
commit 1eef44d5f8
4 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ cache:
- npm - npm
install: install:
- set -eo pipefail - set -eo pipefail
- pip install flake8 - pip install yapf flake8
- make pydist - make pydist
- make install-dist - make install-dist
- pip install -r server/requirements-dev.txt - pip install -r server/requirements-dev.txt
+6
View File
@@ -62,6 +62,12 @@ fmt: fmt-client fmt-server
fmt-%: fmt-%:
cd $(*) && $(MAKE) fmt cd $(*) && $(MAKE) fmt
.PHONY: lint
lint: lint-server
lint-%:
cd $(*) && $(MAKE) lint
# CREATING DISTRIBUTION RELEASE # CREATING DISTRIBUTION RELEASE
+4
View File
@@ -2,6 +2,10 @@
fmt: fmt:
yapf -ir . yapf -ir .
.PHONY: lint
lint:
flake8
.PHONY: clean .PHONY: clean
clean: clean:
rm -f app/web/templates/index.html rm -f app/web/templates/index.html
+1 -1
View File
@@ -1,5 +1,5 @@
set -eo pipefail set -eo pipefail
flake8 server make lint
npm run --prefix client/ build npm run --prefix client/ build
npm run --prefix client/ unit-test npm run --prefix client/ unit-test
pytest -s server/test pytest -s server/test