tools/mypy: only scan the actual app directory
the script was refering to an undefined variable, which made it scan the whole python_payload/apps/ directory. as a side effect the run is ever so slightly faster now, but scanning the whole directory just once would be faster.
also added a check against that to the set line on top
Merge request reports
Activity
As for time difference between scanning apps individually, and the whole directory:
[nix-shell:~/scm/flow3r-firmware]$ time ( export MYPYPATH=$(pwd)/python_payload/mypystubs:$(pwd)/python_payload; mypy ./python_payload/main.py --strict; mypy ./python_payload/apps ) Success: no issues found in 1 source file Success: no issues found in 19 source files real 0m4.838s user 0m4.517s sys 0m0.304s (.venv) [nix-shell:~/scm/flow3r-firmware]$ time ./tools/mypy.sh Checking st3m... Success: no issues found in 1 source file Checking clouds... Success: no issues found in 1 source file Checking demo_cap_touch... Success: no issues found in 2 source files Checking demo_harmonic... Success: no issues found in 1 source file Checking demo_imu... Success: no issues found in 1 source file Checking demo_melodic... Success: no issues found in 1 source file Checking demo_scroll... Success: no issues found in 1 source file Checking demo_worms... Success: no issues found in 1 source file Checking fil3s... Success: no issues found in 6 source files Checking gay_drums... Success: no issues found in 1 source file Checking led_painter... Success: no issues found in 1 source file Checking nick... Success: no issues found in 1 source file Checking otamatone... Success: no issues found in 1 source file Checking shoegaze... Success: no issues found in 1 source file real 0m11.491s user 0m10.116s sys 0m1.335s (.venv) [nix-shell:~/scm/flow3r-firmware]$
Edited by aradded 4 commits
-
0ed6d15c...4e25e98f - 3 commits from branch
flow3r:main
- 06700d05 - tools/mypy: only scan the actual app directory
-
0ed6d15c...4e25e98f - 3 commits from branch
Please register or sign in to reply