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

make: combine formatting tools, add black and isort

This commit is contained in:
Jan Pochyla 2018-07-03 14:26:27 +02:00
parent 1628521ef2
commit 93d1b0751b
3 changed files with 21 additions and 4 deletions

View File

@ -78,6 +78,12 @@ style: ## run code style check on application sources and tests
flake8 $(shell find src -name *.py) flake8 $(shell find src -name *.py)
flake8 $(shell find tests -name *.py) flake8 $(shell find tests -name *.py)
isort:
isort $(shell find src -name *.py ! -path 'src/trezor/messages/*')
black:
black $(shell find src -name *.py ! -path 'src/trezor/messages/*')
## build commands: ## build commands:
build: build_boardloader build_bootloader build_firmware build_prodtest build_unix ## build all build: build_boardloader build_bootloader build_firmware build_prodtest build_unix ## build all

View File

@ -1,4 +0,0 @@
[pytest]
addopts = --pyargs trezorlib.tests.device_tests
xfail_strict = true
run_xfail = lisk

View File

@ -14,3 +14,18 @@ ignore =
F403, F403,
# F405: name may be undefined, or defined from star imports # F405: name may be undefined, or defined from star imports
F405 F405
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
combine_as_imports = True
line_length = 88
not_skip=__init__.py
forced_separate = apps
known_standard_library = micropython,ubinascii,ustruct,uctypes,utime,utimeq,trezorio,trezorui,trezorutils,trezorconfig
[tool:pytest]
addopts = --pyargs trezorlib.tests.device_tests
xfail_strict = true
run_xfail =