From 2111ad8ab6280e5f44e565b7f6a99d5a3e341177 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Mon, 20 Oct 2025 15:38:30 +0200 Subject: [PATCH] chore(test): run `pyright_tool` for `common` and `tools` [no changelog] --- Makefile | 9 +++++++++ core/pyrightconfig.json | 9 +++++++-- pyrightconfig.json | 15 +++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pyrightconfig.json diff --git a/Makefile b/Makefile index 54a462980b..282cbd73b0 100644 --- a/Makefile +++ b/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 diff --git a/core/pyrightconfig.json b/core/pyrightconfig.json index ec1e4d12d7..49e022faa8 100644 --- a/core/pyrightconfig.json +++ b/core/pyrightconfig.json @@ -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", diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 0000000000..adba1e94b8 --- /dev/null +++ b/pyrightconfig.json @@ -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 +}