File tree Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -10,28 +10,20 @@ concurrency:
10
10
cancel-in-progress : true
11
11
12
12
jobs :
13
- # Run "pre-commit run --all-files"
13
+ # Run "pre-commit run --all-files --hook-stage=manual "
14
14
pre-commit :
15
15
name : Run pre-commit hook
16
-
17
16
runs-on : ubuntu-latest
18
- timeout-minutes : 2
19
-
20
- env :
21
- PYTHON_VERSION : 3.8
22
-
17
+ timeout-minutes : 5
23
18
steps :
24
19
- name : Checkout
25
20
uses : actions/checkout@v2
26
-
27
- - name : Set up Python ${{ env.PYTHON_VERSION }}
28
- uses : actions/setup-python@v2
29
- with :
30
- python-version : ${{ env.PYTHON_VERSION }}
31
-
21
+ - name : Set up Python
22
+ uses : actions/setup-python@v3
32
23
- name : Run pre-commit
33
24
uses :
pre-commit/[email protected]
34
-
25
+ with :
26
+ extra_args : --all-files --hook-stage=manual
35
27
- name : Help message if pre-commit fail
36
28
if : ${{ failure() }}
37
29
run : |
41
33
echo "or you can run by hand on staged files with"
42
34
echo " pre-commit run"
43
35
echo "or after-the-fact on already committed files with"
44
- echo " pre-commit run --all-files"
36
+ echo " pre-commit run --all-files --hook-stage=manual "
45
37
46
38
build-n-test-n-coverage :
47
39
name : Build, test and code coverage
Original file line number Diff line number Diff line change 1
- ci :
2
- skip : [check-jsonschema]
3
-
4
1
repos :
5
2
- repo : https://github.com/pre-commit/pre-commit-hooks
6
3
rev : v4.1.0
@@ -34,6 +31,13 @@ repos:
34
31
hooks :
35
32
- id : prettier
36
33
34
+ - repo : https://github.com/PyCQA/doc8
35
+ rev : 0.11.1
36
+ hooks :
37
+ - id : doc8
38
+ args : [--max-line-length=200]
39
+ stages : [manual]
40
+
37
41
- repo : https://github.com/pycqa/flake8
38
42
rev : 4.0.1
39
43
hooks :
44
48
" flake8-logging-format==0.6.0" ,
45
49
" flake8-implicit-str-concat==0.2.0" ,
46
50
]
51
+ stages : [manual]
47
52
48
53
- repo : https://github.com/PyCQA/doc8
49
54
rev : 0.11.1
59
64
files : ^\.github/workflows/
60
65
types : [yaml]
61
66
args : ["--schemafile", "https://json.schemastore.org/github-workflow"]
67
+ stages : [manual]
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ _file:///my/projects/jupyter_client/docs/\_build/html/index.html_
57
57
58
58
## Contributing
59
59
60
- jupyter-client has adopted automatic code formatting so you shouldn't
60
+ ` jupyter-client ` has adopted automatic code formatting so you shouldn't
61
61
need to worry too much about your code style.
62
62
As long as your code is valid,
63
63
the pre-commit hook should take care of how it should look.
@@ -76,3 +76,6 @@ If you have already committed files before setting up the pre-commit
76
76
hook with ` pre-commit install ` , you can fix everything up using
77
77
` pre-commit run --all-files ` . You need to make the fixing commit
78
78
yourself after that.
79
+
80
+ Some of the hooks only run on CI by default, but you can invoke them by
81
+ running with the ` --hook-stage manual ` argument.
You can’t perform that action at this time.
0 commit comments