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@df4cb1c069e1874edd31b4311f1884172cec0e10 # 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@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.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 .