Add ruff pre-commit, small cleanup of code. #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mypy type checks | |
on: [push, pull_request] | |
jobs: | |
mypy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.7, 3.8, 3.9, "3.10"] | |
include: | |
- python-version: 3.7 | |
extra-args: "--no-warn-unused-ignores" | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools | |
python -m pip install numpy pandas flake8 tox mypy | |
- name: Mypy | |
run: | | |
mypy --cache-dir .mypy_cache --install-types ${{ matrix.extra-args }} --non-interactive --strict --allow-untyped-calls --ignore-missing-imports --non-interactive ./src |