-
Notifications
You must be signed in to change notification settings - Fork 58
34 lines (32 loc) · 1.07 KB
/
python_style_checker.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
name: Python style checker
on:
push:
branches: [ main ]
paths-ignore:
- 'scripts/**'
- '.github/workflows/add_new_or_updated_feeds.yml'
- '.github/workflows/**'
pull_request:
branches: [ main ]
jobs:
style-checker:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
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 flake8
- 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
# exit-zero treats all errors as warnings. The Black line length is 88 characters long by default
flake8 . --count --max-complexity=10 --select=B950 --extend-ignore=E501 --max-line-length=88 --statistics