-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (36 loc) · 1.1 KB
/
python.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
36
37
name: Python Code Quality
on:
push:
pull_request:
branches:
- main
jobs:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Black formatting for Python scripts
uses: psf/black@stable
with:
options: --check --verbose
src: .
other:
name: Other
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Multiple other Python code quality check tools combined
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Code Quality tools
run: pip install ruff flake8 mypy isort
- name: Ruff extremely fast Python linter and code formatter
run: ruff check */*.py
- name: Flake8 (with Black compatible settings)
run: flake8 --max-line-length=88 --extend-ignore=E203,E701 */*.py
- name: Mypy strict static type checking
run: mypy --strict */*.py
- name: Isort imports alphabetically, separated into sections and by type
run: isort --check --diff --profile black */*.py