diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt index 5f50cb4b02..adf6d03ba4 100644 --- a/.github/scripts/requirements.txt +++ b/.github/scripts/requirements.txt @@ -4,6 +4,5 @@ cmakelang==0.6.13 codespell==2.4.2 -pytype==2024.10.11 reuse==6.2.0 ruff==0.15.16 diff --git a/.github/workflows/checksrc.yml b/.github/workflows/checksrc.yml index dad8ed48f5..83f5afe7a1 100644 --- a/.github/workflows/checksrc.yml +++ b/.github/workflows/checksrc.yml @@ -88,16 +88,32 @@ jobs: run: | scripts/perlcheck.sh - - name: 'pytype' - run: | - source ~/venv/bin/activate - find . -name '*.py' -exec pytype -j auto -k -- {} + - - name: 'ruff' run: | source ~/venv/bin/activate scripts/pythonlint.sh + pytype: + name: 'pytype' + runs-on: ubuntu-24.04-arm # pytype is discontinued and requires python 3.8-3.12 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: 'install prereqs' + run: | + python3 -m venv ~/venv + ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary pytype==2024.10.11 \ + -r .github/scripts/requirements.txt \ + -r tests/http/requirements.txt \ + -r tests/requirements.txt + + - name: 'check' + run: | + source ~/venv/bin/activate + find . -name '*.py' -exec pytype -j auto -k -- {} + + complexity: name: 'complexity and function sizes' runs-on: ubuntu-slim