name: Run mypy on: push: branches: - 'master' paths: - pyproject.toml - uv.lock - '**/*.py' - '.github/workflows/python-mypy.yaml' pull_request: branches: - master paths: - pyproject.toml - uv.lock - '**/*.py' - '.github/workflows/python-mypy.yaml' jobs: run-mypy: runs-on: ubuntu-24.04 strategy: matrix: python-version: ["3.13"] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: ${{ matrix.python-version }} - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: version: '0.9.17' - name: Install dependencies run: | uv venv uv pip install --group mypy - name: Prepare config directory run: | # The django-stubs plugin imports anthias_server.django_project.settings, which # transitively instantiates AnthiasSettings(). On first run that # tries to read ~/.anthias/anthias.conf — write a minimal valid # one with the section headers AnthiasSettings expects. mkdir -p ~/.anthias cat > ~/.anthias/anthias.conf <<'CONF' [main] [viewer] [auth_basic] CONF - name: Run mypy run: | uv run mypy .