Skip to content

Commit 20fde5c

Browse files
committed
setup python linting workflow
1 parent 39e15a7 commit 20fde5c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/python_lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Ensure Python code is linted and formatted, matching the style guide
2+
name: Python Linting
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
black-lint:
8+
runs-on: ubuntu-latest
9+
name: Python black Lint
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: psf/black@stable
13+
flake8-lint:
14+
runs-on: ubuntu-latest
15+
name: Python flake8 Lint
16+
steps:
17+
- name: Check out source repository
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python environment
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.11"
24+
25+
- name: flake8 Lint
26+
uses: py-actions/flake8@v2
27+
with:
28+
ignore: "E701,W503,E203"
29+
exclude: "docs,.idea"
30+
max-line-length: "88"
31+
path: "."
32+
plugins: "flake8-docstrings flake8-black"

0 commit comments

Comments
 (0)