File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
7
- style :
7
+ pre-commit :
8
8
9
9
runs-on : ubuntu-latest
10
10
@@ -20,14 +20,18 @@ jobs:
20
20
- name : Upgrade pip
21
21
run : python -m pip install --upgrade pip
22
22
23
- - name : Install dependencies
24
- run : python -m pip install "flake8==4.0.1" "black==22.3.0"
23
+ - name : Install pre-commit
24
+ run : pip install pre-commit
25
25
26
- - name : check style with black
27
- run : python -m black mip --line-length=89 --check --diff
26
+ - name : Check pre-commit version
27
+ run : pre-commit --version
28
+
29
+ - name : Set up hooks
30
+ run : pre-commit install
31
+
32
+ - name : Check style
33
+ run : pre-commit run --all-files
28
34
29
- - name : check for unused imports with flake8
30
- run : python -m flake8 mip --select=F401 --exclude=__init__.py
31
35
32
36
33
37
test :
Original file line number Diff line number Diff line change
1
+ files : ^mip/
2
+ exclude : ^mip/_version.py
3
+ repos :
4
+ - repo : https://github.com/psf/black
5
+ rev : 22.3.0
6
+ hooks :
7
+ - id : black
8
+ args : [--line-length=89]
9
+ - repo : https://gitlab.com/pycqa/flake8
10
+ rev : 4.0.1
11
+ hooks :
12
+ - id : flake8
13
+ args : [--select=F401, --exclude=__init__.py]
You can’t perform that action at this time.
0 commit comments