Skip to content

Commit bf0331e

Browse files
committed
Added python-linter.yml
1 parent 1540095 commit bf0331e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint Python Code
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths: ['**.py']
7+
8+
jobs:
9+
python-linter:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checking out repo
13+
uses: actions/[email protected]
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
19+
20+
- name: Install dependencies
21+
run: |
22+
pip install flake8
23+
24+
- name: Lint Python Code
25+
run: |
26+
flake8 . --select=E901,E999,F821,F822,F823 --exclude=__init__.py
27+
env:
28+
FLAKE8_OPTIONS: "--ignore=E203,W503"

0 commit comments

Comments
 (0)