test #2
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: Pylint | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install "nbqa[toolchain]" pylint isort "black[jupyter]" mypy pyupgrade flake8-variables-names pep8-naming flake8-functions-names pandas-stubs git+https://github.com/numpy/numpy-stubs mypy-extensions types-requests types-PyYAML types-setuptools | |
- name: Pylint | |
run: | | |
pylint --max-line-length=79 --const-naming-style=any --disable=E2515,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136 --disable=import-error $(git ls-files '*.py' '*.ipynb') | |
nbqa pylint --max-line-length=79 --const-naming-style=any --disable=E2515,C0303,E1101,R1716,E0401,W1514,C0200,C0114,C0301,E0602,W0104,C0302,R0801,E1136 --disable=import-error $(git ls-files '*.py' '*.ipynb') | |
- name: Flake8 | |
run: | | |
flake8 --ignore=E203,E501,W291,F821,F401,E402,E121 $(git ls-files '*.py' '*.ipynb') | |
nbqa flake8 --ignore=E203,E501,W291,F821,F401,E402,E121 $(git ls-files '*.py' '*.ipynb') | |
- name: Mypy | |
run: | | |
# mypy --exclude=^misc/ --ignore-missing-imports --explicit-package-bases --ignore-missing-imports --disallow-untyped-calls --disallow-untyped-defs --disallow-untyped-decorators --strict --extra-checks --disallow-any-decorated --disallow-any-generics --local-partial-types --pretty --force-uppercase-builtins --force-union-syntax --force-union-syntax --warn-unreachable --warn-redundant-casts --warn-return-any $(git ls-files '*.py' '*.ipynb') | |
nbqa mypy --exclude=^misc/ --ignore-missing-imports --explicit-package-bases --ignore-missing-imports --disallow-untyped-calls --disallow-untyped-defs --disallow-untyped-decorators --strict --extra-checks --disallow-any-decorated --disallow-any-generics --local-partial-types --pretty --force-uppercase-builtins --force-union-syntax --force-union-syntax --warn-unreachable --warn-redundant-casts --warn-return-any $(git ls-files '*.ipynb') | |
- name: isort | |
run: | | |
isort --check-only --diff $(git ls-files '*.py' '*.ipynb') | |
nbqa isort --check-only --diff $(git ls-files '*.py' '*.ipynb') | |
- name: pyupgrade | |
run: | | |
# pyupgrade $(git ls-files '*.py' '*.ipynb') | |
nbqa pyupgrade $(git ls-files '*.py' '*.ipynb') | |
- name: Black | |
run: | | |
black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') | |
nbqa black --diff --line-length=79 $(git ls-files '*.py' '*.ipynb') |