-
Notifications
You must be signed in to change notification settings - Fork 15
41 lines (32 loc) · 1.1 KB
/
python-style-check.yaml
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
name: Python Style Check
on:
pull_request:
branches:
- dev
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Clean up Python bytecode
run: |
find . -name "*.pyc" -delete
find . -name "__pycache__" -delete
find . -name ".pytest_cache" -type d -exec rm -r "{}" +
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==7.0.0 black==24.2.0 docformatter==1.7.5
- name: Check with Black
run: |
black --check --line-length 88 --exclude='/neurobench/examples/' .
- name: Check with docformatter
run: |
docformatter --wrap-summaries 88 --wrap-descriptions 88 --pre-summary-newline --exclude /neurobench/examples/ --recursive --blank --black --check .
- name: Run Flake8
run: |
flake8 --count --ignore=E501,E203,W291,W503,F403,F401 --max-line-length=88 --statistics --show-source --exclude=/neurobench/examples/ .