mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-02-19 16:22:44 +01:00
chore(test): run pyright_tool for common and tools
[no changelog]
This commit is contained in:
9
Makefile
9
Makefile
@@ -21,6 +21,8 @@ pystyle_check: ## run code style check on application sources and tests
|
||||
pyright --version
|
||||
@echo [TYPECHECK]
|
||||
@make -C core typecheck
|
||||
@echo [TYPECHECK - COMMON and TOOLS]
|
||||
@make typecheck
|
||||
@echo [FLAKE8]
|
||||
@flake8 $(PY_FILES)
|
||||
@echo [ISORT]
|
||||
@@ -44,6 +46,8 @@ pystyle: ## apply code style on application sources and tests
|
||||
@black $(PY_FILES)
|
||||
@echo [TYPECHECK]
|
||||
@make -C core typecheck
|
||||
@echo [TYPECHECK - COMMON and TOOLS]
|
||||
@make typecheck
|
||||
@echo [FLAKE8]
|
||||
@flake8 $(PY_FILES)
|
||||
@echo [PYLINT]
|
||||
@@ -98,6 +102,11 @@ ruststyle_check:
|
||||
@cd core/embed/rust ; cargo fmt -- --check
|
||||
@cd rust/trezor-client ; cargo fmt -- --check
|
||||
|
||||
typecheck: pyright
|
||||
|
||||
pyright:
|
||||
python ./tools/pyright_tool.py
|
||||
|
||||
## code generation commands:
|
||||
|
||||
mocks: ## generate mock python headers from C modules
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
{
|
||||
"include": [
|
||||
"src"
|
||||
"src",
|
||||
"tools",
|
||||
"site_scons"
|
||||
],
|
||||
"exclude": [
|
||||
"src/apps/monero",
|
||||
"src/typing.py"
|
||||
"src/typing.py",
|
||||
"tools/bluez_emu_bridge",
|
||||
"tools/codegen/get_trezor_keys.py",
|
||||
"tools/snippets"
|
||||
],
|
||||
"stubPath": "mocks/generated",
|
||||
"typeCheckingMode": "basic",
|
||||
|
||||
15
pyrightconfig.json
Normal file
15
pyrightconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"include": [
|
||||
"tools",
|
||||
"common"
|
||||
],
|
||||
"exclude": [
|
||||
"tools/pyright_tool.py",
|
||||
"tools/snippets"
|
||||
],
|
||||
"stubPath": "mocks/generated",
|
||||
"typeCheckingMode": "basic",
|
||||
"pythonVersion": "3.10",
|
||||
"reportMissingModuleSource": false,
|
||||
"reportMissingImports": false
|
||||
}
|
||||
Reference in New Issue
Block a user