File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
+ CHECK_FILES=" setup.py src tests"
5
6
YAPF_VERSION=0.20.1
6
7
7
8
python -m pip install -U pip setuptools wheel
@@ -13,16 +14,16 @@ pip install dist/*.zip
13
14
pip install -Ur test-requirements.txt
14
15
15
16
if [ " $CHECK_FORMATTING " = " 1" ]; then
16
- pip install yapf==${YAPF_VERSION} isort> =5 mypy pyright
17
- if ! yapf -rpd setup.py src tests ; then
17
+ pip install yapf==${YAPF_VERSION} " isort>=5" mypy pyright
18
+ if ! yapf -rpd $CHECK_FILES ; then
18
19
cat << EOF
19
20
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20
21
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21
22
22
23
Formatting problems were found (listed above). To fix them, run
23
24
24
25
pip install yapf==${YAPF_VERSION}
25
- yapf -rpi setup.py src tests
26
+ yapf -rpi $CHECK_FILES
26
27
27
28
in your local checkout.
28
29
32
33
exit 1
33
34
fi
34
35
35
- if ! isort --check-only --diff . ; then
36
+ if ! isort --check-only --diff $CHECK_FILES ; then
36
37
cat << EOF
37
38
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38
39
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39
40
40
41
Formatting problems were found (listed above). To fix them, run
41
42
42
43
pip install isort
43
- isort .
44
+ isort $CHECK_FILES
44
45
45
46
in your local checkout.
46
47
You can’t perform that action at this time.
0 commit comments