File tree Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
2
3
3
jobs :
4
+ lint :
5
+ docker :
6
+ - image : cimg/python:3.8.12
7
+ steps :
8
+ - checkout
9
+ - run :
10
+ name : dependencies
11
+ command : |
12
+ source build_tools/shared.sh
13
+ # Include pytest compatibility with mypy
14
+ pip install pytest flake8 $(get_dep mypy min) $(get_dep black min)
15
+ - run :
16
+ name : linting
17
+ command : ./build_tools/linting.sh
18
+
4
19
doc-min-dependencies :
5
20
docker :
6
21
- image : cimg/python:3.8.12
@@ -98,8 +113,13 @@ workflows:
98
113
version : 2
99
114
build-doc-and-deploy :
100
115
jobs :
101
- - doc
102
- - doc-min-dependencies
116
+ - lint
117
+ - doc :
118
+ requires :
119
+ - lint
120
+ - doc-min-dependencies :
121
+ requires :
122
+ - lint
103
123
- deploy :
104
124
requires :
105
125
- doc
Original file line number Diff line number Diff line change @@ -33,18 +33,12 @@ jobs:
33
33
inputs :
34
34
versionSpec : ' 3.9'
35
35
- bash : |
36
+ source build_tools/shared.sh
36
37
# Include pytest compatibility with mypy
37
- pip install pytest flake8 mypy==0.961 black==22.3.0
38
+ pip install pytest flake8 $(get_dep mypy min) $(get_dep black min)
38
39
displayName: Install linters
39
40
- bash : |
40
- black --check --diff .
41
- displayName: Run black
42
- - bash : |
43
- ./build_tools/azure/linting.sh
44
- displayName: Run linting
45
- - bash : |
46
- mypy sklearn/
47
- displayName: Run mypy
41
+ ./build_tools/linting.sh
48
42
49
43
- template : build_tools/azure/posix.yml
50
44
parameters :
Original file line number Diff line number Diff line change 4
4
# pipefail is necessary to propagate exit codes
5
5
set -o pipefail
6
6
7
+ black --check --diff .
8
+ echo -e " No problem detected by black\n"
9
+
7
10
flake8 --show-source .
8
11
echo -e " No problem detected by flake8\n"
9
12
13
+ mypy sklearn/
14
+ echo -e " No problem detected by mypy\n"
15
+
10
16
# For docstrings and warnings of deprecated attributes to be rendered
11
17
# properly, the property decorator must come before the deprecated decorator
12
18
# (else they are treated as functions)
You can’t perform that action at this time.
0 commit comments