| 1 |
name: Run MyPy |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ main, 7.x] |
| 6 |
pull_request: |
| 7 |
branches: [ main, 7.x] |
| 8 |
|
| 9 |
permissions: |
| 10 |
contents: read |
| 11 |
|
| 12 |
jobs: |
| 13 |
build: |
| 14 |
|
| 15 |
runs-on: ubuntu-latest |
| 16 |
strategy: |
| 17 |
matrix: |
| 18 |
python-version: ["3.14"] |
| 19 |
|
| 20 |
steps: |
| 21 |
- uses: actions/checkout@v6 |
| 22 |
- name: Set up Python ${{ matrix.python-version }} |
| 23 |
uses: actions/setup-python@v6 |
| 24 |
with: |
| 25 |
python-version: ${{ matrix.python-version }} |
| 26 |
cache: pip |
| 27 |
- name: Install uv |
| 28 |
uses: astral-sh/setup-uv@v7 |
| 29 |
- name: Install dependencies |
| 30 |
run: | |
| 31 |
uv pip install --system mypy pyflakes flake8 types-decorator '.[all]' |
| 32 |
- name: Lint with mypy |
| 33 |
run: | |
| 34 |
set -e |
| 35 |
mypy IPython |
| 36 |
- name: Lint with pyflakes |
| 37 |
run: | |
| 38 |
set -e |
| 39 |
flake8 IPython/core/magics/script.py |
| 40 |
flake8 IPython/core/magics/packaging.py |