Skip to content
Snippets Groups Projects

tools/mypy: only scan the actual app directory

Merged ar requested to merge arachnist/flow3r-firmware:mypy-run-fix into main

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Contributor

    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 ar
  • ar added 2 commits

    added 2 commits

    • dd6ad21c - 1 commit from branch flow3r:main
    • bbc1896f - tools/mypy: only scan the actual app directory

    Compare with previous version

  • ar added 2 commits

    added 2 commits

    • 41920e6f - 1 commit from branch flow3r:main
    • 0ed6d15c - tools/mypy: only scan the actual app directory

    Compare with previous version

  • q3k added 4 commits

    added 4 commits

    Compare with previous version

  • q3k added 2 commits

    added 2 commits

    • c05758fa - 1 commit from branch flow3r:main
    • a8370953 - tools/mypy: only scan the actual app directory

    Compare with previous version

  • q3k merged

    merged

Please register or sign in to reply
Loading