generated from pollen-robotics/python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.47 KB
/
lint.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Linter
on: [push]
jobs:
black:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --verbose"
version: "23.3.0"
flake8:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
sudo apt install -y libgirepository1.0-dev
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# option --exit-zero can be added to this line to set these errors as warnings
flake8 . --count --max-complexity=10 --max-line-length=128 --statistics
mypy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
sudo apt install -y libgirepository1.0-dev
python -m pip install --upgrade pip
pip install .[dev]
- name : Lint with mypy
run : mypy . -v