##// END OF EJS Templates
Statically type OInfo. (#13973)...
Statically type OInfo. (#13973) In view of working with #13860, some cleanup inspect to be properly typed, and using stricter datastructure. Instead of dict we now use dataclasses, this will make sure that fields type and access can be stricter and verified not only at runtime, but by mypy

File last commit:

r28011:f6cb59f8
r28166:29b451fc merge
Show More
mypy.yml
41 lines | 923 B | text/x-yaml | YamlLexer
Matthias Bussonnier
run mypy on github action...
r26158 name: Run MyPy
on:
push:
Jarrod Millman
Rename master to main
r27712 branches: [ main, 7.x]
Matthias Bussonnier
run mypy on github action...
r26158 pull_request:
Jarrod Millman
Rename master to main
r27712 branches: [ main, 7.x]
Matthias Bussonnier
run mypy on github action...
r26158
Matthias Bussonnier
SEC: force workflows to be read-only....
r27782 permissions:
contents: read
Matthias Bussonnier
run mypy on github action...
r26158 jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
Matthias Bussonnier
Test on more recent Python versions.
r27973 python-version: ["3.x"]
Matthias Bussonnier
run mypy on github action...
r26158
steps:
Christian Clauss
Upgrade GitHub Actions
r27725 - uses: actions/checkout@v3
Matthias Bussonnier
run mypy on github action...
r26158 - name: Set up Python ${{ matrix.python-version }}
Christian Clauss
Upgrade GitHub Actions
r27725 uses: actions/setup-python@v4
Matthias Bussonnier
run mypy on github action...
r26158 with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Matthias Bussonnier
pyflakes to avoid missing imports
r26208 pip install mypy pyflakes flake8
Matthias Bussonnier
run mypy on github action...
r26158 - name: Lint with mypy
run: |
krassowski
Fix mypy job, fix issues detected by mypy
r28011 set -e
Matthias Bussonnier
update
r26485 mypy -p IPython.terminal
mypy -p IPython.core.magics
krassowski
Check types with mypy
r27915 mypy -p IPython.core.guarded_eval
krassowski
Enable mypy typing checks for completer
r27917 mypy -p IPython.core.completer
Matthias Bussonnier
pyflakes to avoid missing imports
r26208 - name: Lint with pyflakes
run: |
krassowski
Fix mypy job, fix issues detected by mypy
r28011 set -e
Matthias Bussonnier
pyflakes to avoid missing imports
r26208 flake8 IPython/core/magics/script.py
Matthias Bussonnier
update
r26485 flake8 IPython/core/magics/packaging.py