Skip to content

Commit 2e96668

Browse files
committed
linter and github action
1 parent 8e7b297 commit 2e96668

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.flake8

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[flake8]
2+
max-line-length = 120
3+
ignore = E203, E266, E501, W503
4+
select = B,C,E,F,W,T4,B9
5+
max-complexity = 18
6+
exclude =
7+
.git,
8+
__pycache__,
9+
docs/source/conf.py,
10+
old,
11+
build,
12+
dist
13+
per-file-ignores =
14+
__init__.py:F401

.github/python-linter.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Python Linter
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.x'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install flake8
18+
- name: Run linter
19+
run: flake8 .

0 commit comments

Comments
 (0)