1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

feat(ci): add quick style checks suitable for git hooks

[no changelog]
This commit is contained in:
grdddj 2022-02-14 18:15:11 +01:00 committed by Jiří Musil
parent 02660ea64a
commit 0e27423cff
2 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,11 @@ pystyle_check: ## run code style check on application sources and tests
@echo [PYTHON]
make -C python style_check
pystyle_quick_check: ## run the basic style checks, suitable for a quick git hook
@isort --check-only $(PY_FILES)
@black --check $(PY_FILES)
make -C python style_quick_check
pystyle: ## apply code style on application sources and tests
@echo [ISORT]
@isort $(PY_FILES)

View File

@ -57,6 +57,10 @@ style_check:
flake8
pyright
style_quick_check:
black --check $(STYLE_TARGETS)
isort --check-only --recursive $(STYLE_TARGETS) --skip-glob "$(EXCLUDE_TARGETS)/*"
.PHONY: all build install clean style style_check git-clean clean-build clean-pyc clean-test
test: