chore(test): run pyright_tool for common and tools

[no changelog]
This commit is contained in:
M1nd3r
2025-10-20 15:38:30 +02:00
committed by Petr Sedláček
parent 78487cee6b
commit 2111ad8ab6
3 changed files with 31 additions and 2 deletions

View File

@@ -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

View File

@@ -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
View 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
}