File tree Expand file tree Collapse file tree 4 files changed +35
-14
lines changed Expand file tree Collapse file tree 4 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 1
- # !/usr/bin/env -S pre-commit run -ac
2
1
---
3
2
repos :
4
3
- repo : https://github.com/pre-commit/pre-commit-hooks
@@ -23,11 +22,11 @@ repos:
23
22
- id : check-toml
24
23
- id : check-json
25
24
- repo : https://github.com/Lucas-C/pre-commit-hooks
26
- rev : v1.4.2
25
+ rev : v1.5.4
27
26
hooks :
28
27
- id : remove-crlf
29
28
- repo : https://github.com/codespell-project/codespell
30
- rev : v2.2.4
29
+ rev : v2.2.5
31
30
hooks :
32
31
- id : codespell
33
32
additional_dependencies :
@@ -39,24 +38,27 @@ repos:
39
38
args :
40
39
- --msg-filename
41
40
- repo : https://github.com/editorconfig-checker/editorconfig-checker.python
42
- rev : 2.7.1
41
+ rev : 2.7.2
43
42
hooks :
44
43
- id : editorconfig-checker
45
44
- repo : https://github.com/jumanjihouse/pre-commit-hooks
46
45
rev : 3.0.0
47
46
hooks :
48
47
- id : check-mailmap
48
+ - repo : https://github.com/rhysd/actionlint
49
+ rev : v1.6.25
50
+ hooks :
51
+ - id : actionlint
49
52
- repo : https://github.com/adrienverge/yamllint
50
- rev : v1.30 .0
53
+ rev : v1.32 .0
51
54
hooks :
52
55
- id : yamllint
53
56
- repo : https://github.com/executablebooks/mdformat
54
57
rev : 0.7.16
55
58
hooks :
56
59
- id : mdformat
57
- args :
58
- - --number
59
60
additional_dependencies :
61
+ - mdformat-pyproject
60
62
- mdformat-gfm
61
63
- mdformat-myst
62
64
- mdformat-toc
@@ -65,22 +67,22 @@ repos:
65
67
- mdformat-black
66
68
- mdformat-config
67
69
- repo : https://github.com/DavidAnson/markdownlint-cli2
68
- rev : v0.6.0
70
+ rev : v0.8.1
69
71
hooks :
70
72
- id : markdownlint-cli2
71
73
additional_dependencies :
72
74
73
75
- repo : https://github.com/Freed-Wu/pre-commit-hooks
74
- rev : 0.0.10
76
+ rev : 0.0.11
75
77
hooks :
76
78
- id : update-CITATION.cff
77
79
- id : update-pyproject.toml
78
80
- repo : https://github.com/perltidy/perltidy
79
- rev : " 20230309 .02"
81
+ rev : " 20230701 .02"
80
82
hooks :
81
83
- id : perltidy
82
84
- repo : https://github.com/psf/black
83
- rev : 23.1 .0
85
+ rev : 23.7 .0
84
86
hooks :
85
87
- id : black
86
88
- repo : https://github.com/PyCQA/isort
94
96
additional_dependencies :
95
97
- tomli
96
98
- repo : https://github.com/kumaraditya303/mirrors-pyright
97
- rev : v1.1.300
99
+ rev : v1.1.322
98
100
hooks :
99
101
- id : pyright
100
102
- repo : https://github.com/PyCQA/bandit
Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ examples.
114
114
115
115
#### [ Generate API Document] ( https://github.com/Freed-Wu/translate-shell/tree/main/docs/api/translate_shell.md )
116
116
117
+ ** Note** : A more "sphinx" solution is
118
+ [ sphinxcontrib-autofile] ( https://github.com/sphinx-contrib/autofile ) .
119
+
117
120
Before:
118
121
119
122
```` markdown
@@ -142,7 +145,7 @@ scripts/generate-api.md.pl src/*/*.py
142
145
`````
143
146
144
147
Where
145
- [ ` scripts/generate-api.md.pl ` ] ( https://github.com/Freed-Wu/translate-shell /blob/main/scripts/generate-api.md.pl )
148
+ [ ` scripts/generate-api.md.pl ` ] ( https://github.com/sphinx-contrib/eval /blob/main/scripts/generate-api.md.pl )
146
149
replaces all ` src/translate_shell/XXX.py ` s to
147
150
148
151
``` rst
@@ -184,6 +187,9 @@ searches all `TODO`s in code then convert them to correct hyperlinks.
184
187
185
188
#### [ Generate Requirements Document] ( https://github.com/Freed-Wu/translate-shell/tree/main/docs/resources/requirements.md )
186
189
190
+ ** Note** : A more "sphinx" solution is
191
+ [ sphinxcontrib-requirements-txt] ( https://github.com/sphinx-contrib/requirements-txt ) .
192
+
187
193
Before:
188
194
189
195
``` markdown
@@ -210,7 +216,7 @@ generate-requirements.md.pl
210
216
````
211
217
212
218
Where
213
- [ ` scripts/generate-requirements.md.pl ` ] ( https://github.com/Freed-Wu/translate-shell /blob/main/scripts/generate-requirements.md.pl )
219
+ [ ` scripts/generate-requirements.md.pl ` ] ( https://github.com/sphinx-contrib/eval /blob/main/scripts/generate-requirements.md.pl )
214
220
searches all ` requirements/*.txt ` s and ` requirements/completion.txt ` is:
215
221
216
222
``` unixconfig
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ file = "requirements/dev.txt"
51
51
file = " requirements/myst.txt"
52
52
# end: scripts/update-pyproject.toml.pl
53
53
54
+ [tool .mdformat ]
55
+ number = true
56
+
54
57
[tool .black ]
55
58
line-length = 79
56
59
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env -S perl -p
2
+ $title = $ARGV ;
3
+ $title =~ s = .*?requirements/(.*?)\. txt= $1 = ;
4
+ if (m ( ^[^#].*://) ) {
5
+ s = (^.*://)(.*)= - [$1$2 ](https://$2 )= ;
6
+ next ;
7
+ }
8
+ s ` ^([^#\n ][^\s [>=<^!^]*)` - [$1 ](https://pypi.org/project/$1 )` ;
9
+ s / ^#\s *// ;
10
+ s / ^!.*/ ## $title / ;
You can’t perform that action at this time.
0 commit comments