-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (35 loc) · 1.2 KB
/
linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Python Lint
on: [push, pull_request]
jobs:
linter:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: isort Lint
uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt requirements_dev.txt"
configuration: "--check-only --diff --profile black"
- name: black Lint
uses: psf/black@stable
with:
options: "--check --verbose"
- name: mypy Lint
uses: jpetrucciani/mypy-check@master
with:
mypy_flags: "--exclude .git --exclude __pycache__ --exclude venv --exclude .mypy_cache --exclude build --exclude dist --ignore-missing-imports --show-error-context"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
exclude: ".git,__pycache__,venv,.mypy_cache,build,dist"
args: "--extend-ignore=E203,E501 --count --show-source --statistics"
max-line-length: "88"
plugins: "flake8-black"