pyproject-pre-commit 0.3.4__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyproject_pre_commit/pyproject_pre_commit.py +14 -2
- {pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/METADATA +81 -39
- pyproject_pre_commit-0.4.0.dist-info/RECORD +9 -0
- {pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/WHEEL +1 -1
- pyproject_pre_commit-0.3.4.dist-info/RECORD +0 -9
- {pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/entry_points.txt +0 -0
- {pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -133,15 +133,27 @@ ignore-missing-imports = true
|
|
133
133
|
scripts_are_modules = true
|
134
134
|
install_types = true
|
135
135
|
non_interactive = true
|
136
|
+
|
137
|
+
[tool.numpydoc_validation]
|
138
|
+
checks = [
|
139
|
+
"all", # report on all checks, except the below
|
140
|
+
"EX01", # "No examples section found"
|
141
|
+
"ES01", # "No extended summary found"
|
142
|
+
"SA01", # "See Also section not found"
|
143
|
+
"GL08", # "The object does not have a docstring"
|
144
|
+
"PR01", # "Parameters {missing_params} not documented"
|
145
|
+
"PR02", # "Unknown parameters {unknown_params}"
|
146
|
+
"RT01", # "No Returns section found"
|
147
|
+
]
|
136
148
|
"""
|
137
149
|
)
|
138
150
|
|
139
151
|
|
140
152
|
def main() -> None:
|
141
153
|
usage = "Usage: ppc <--pre-commit | --pyproject> [--ruff] [--black]"
|
142
|
-
if len(sys.argv)
|
154
|
+
if len(sys.argv) < 2:
|
143
155
|
print(usage) # noqa: T201
|
144
|
-
sys.exit(
|
156
|
+
sys.exit(0)
|
145
157
|
is_ruff = "--ruff" in sys.argv
|
146
158
|
if "--pre-commit" in sys.argv:
|
147
159
|
pre_commit(is_ruff)
|
@@ -1,11 +1,14 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pyproject-pre-commit
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: pre-commit hooks for python projects using pyproject.toml.
|
5
|
-
Project-URL:
|
6
|
-
Project-URL:
|
7
|
-
Project-URL:
|
5
|
+
Project-URL: Repository, https://github.com/rcmdnk/pyproject-pre-commit
|
6
|
+
Project-URL: Documentation, https://github.com/rcmdnk/pyproject-pre-commit
|
7
|
+
Project-URL: Homepage, https://github.com/rcmdnk/pyproject-pre-commit
|
8
|
+
Project-URL: Issue, https://github.com/rcmdnk/pyproject-pre-commit/issues
|
8
9
|
Author-email: rcmdnk <rcmdnk@gmail.com>
|
10
|
+
License-Expression: Apache-2.0
|
11
|
+
License-File: LICENSE
|
9
12
|
Keywords: pre-commit,pyproject.toml,uv
|
10
13
|
Classifier: Development Status :: 3 - Alpha
|
11
14
|
Classifier: Environment :: Console
|
@@ -15,24 +18,7 @@ Classifier: Topic :: Software Development
|
|
15
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
16
19
|
Classifier: Topic :: Utilities
|
17
20
|
Requires-Python: >=3.9.0
|
18
|
-
Requires-Dist:
|
19
|
-
Requires-Dist: autopep8>=2.0.4
|
20
|
-
Requires-Dist: bandit[toml]>=1.7.5
|
21
|
-
Requires-Dist: black>=24.3.0
|
22
|
-
Requires-Dist: blacken-docs>=1.16.0
|
23
|
-
Requires-Dist: flake8-annotations-complexity>=0.0.8
|
24
|
-
Requires-Dist: flake8-bugbear>=24.0.0
|
25
|
-
Requires-Dist: flake8-builtins>=2.1.0
|
26
|
-
Requires-Dist: flake8-comprehensions>=3.14.0
|
27
|
-
Requires-Dist: flake8-debugger>=4.1.2
|
28
|
-
Requires-Dist: flake8-docstrings>=1.7.0
|
29
|
-
Requires-Dist: flake8-executable>=2.1.3
|
30
|
-
Requires-Dist: flake8-pep3101>=2.0.0
|
31
|
-
Requires-Dist: flake8-print>=5.0.0
|
32
|
-
Requires-Dist: flake8-pyproject>=1.2.3
|
33
|
-
Requires-Dist: flake8-rst-docstrings>=0.3.0
|
34
|
-
Requires-Dist: flake8-string-format>=0.3.0
|
35
|
-
Requires-Dist: isort>=5.12.0
|
21
|
+
Requires-Dist: actionlint-py>=1.7.7.23
|
36
22
|
Requires-Dist: mdformat-config>=0.2.1
|
37
23
|
Requires-Dist: mdformat-footnote>=0.1.1
|
38
24
|
Requires-Dist: mdformat-frontmatter>=2.0.1
|
@@ -45,11 +31,53 @@ Requires-Dist: mdformat-web>=0.2.0
|
|
45
31
|
Requires-Dist: mdformat>=0.7.17
|
46
32
|
Requires-Dist: mypy>=1.5.1
|
47
33
|
Requires-Dist: numpydoc>=1.8.0
|
48
|
-
Requires-Dist: pep8-naming>=0.14.0
|
49
34
|
Requires-Dist: pre-commit>=4.0.0
|
50
|
-
Requires-Dist: pycodestyle>=2.11.0
|
51
35
|
Requires-Dist: shellcheck-py>=0.9.0.5
|
52
36
|
Requires-Dist: validate-pyproject[all]>=0.22
|
37
|
+
Provides-Extra: all
|
38
|
+
Requires-Dist: autoflake>=2.2.1; extra == 'all'
|
39
|
+
Requires-Dist: autopep8>=2.0.4; extra == 'all'
|
40
|
+
Requires-Dist: bandit[toml]>=1.7.5; extra == 'all'
|
41
|
+
Requires-Dist: black>=24.3.0; extra == 'all'
|
42
|
+
Requires-Dist: blacken-docs>=1.16.0; extra == 'all'
|
43
|
+
Requires-Dist: flake8-annotations-complexity>=0.0.8; extra == 'all'
|
44
|
+
Requires-Dist: flake8-bugbear>=24.0.0; extra == 'all'
|
45
|
+
Requires-Dist: flake8-builtins>=2.1.0; extra == 'all'
|
46
|
+
Requires-Dist: flake8-comprehensions>=3.14.0; extra == 'all'
|
47
|
+
Requires-Dist: flake8-debugger>=4.1.2; extra == 'all'
|
48
|
+
Requires-Dist: flake8-docstrings>=1.7.0; extra == 'all'
|
49
|
+
Requires-Dist: flake8-executable>=2.1.3; extra == 'all'
|
50
|
+
Requires-Dist: flake8-pep3101>=2.0.0; extra == 'all'
|
51
|
+
Requires-Dist: flake8-print>=5.0.0; extra == 'all'
|
52
|
+
Requires-Dist: flake8-pyproject>=1.2.3; extra == 'all'
|
53
|
+
Requires-Dist: flake8-rst-docstrings>=0.3.0; extra == 'all'
|
54
|
+
Requires-Dist: flake8-string-format>=0.3.0; extra == 'all'
|
55
|
+
Requires-Dist: isort>=5.12.0; extra == 'all'
|
56
|
+
Requires-Dist: mdformat-ruff>=0.1.3; extra == 'all'
|
57
|
+
Requires-Dist: pep8-naming>=0.14.0; extra == 'all'
|
58
|
+
Requires-Dist: pycodestyle>=2.11.0; extra == 'all'
|
59
|
+
Requires-Dist: ruff>=0.7.2; extra == 'all'
|
60
|
+
Provides-Extra: black
|
61
|
+
Requires-Dist: autoflake>=2.2.1; extra == 'black'
|
62
|
+
Requires-Dist: autopep8>=2.0.4; extra == 'black'
|
63
|
+
Requires-Dist: bandit[toml]>=1.7.5; extra == 'black'
|
64
|
+
Requires-Dist: black>=24.3.0; extra == 'black'
|
65
|
+
Requires-Dist: blacken-docs>=1.16.0; extra == 'black'
|
66
|
+
Requires-Dist: flake8-annotations-complexity>=0.0.8; extra == 'black'
|
67
|
+
Requires-Dist: flake8-bugbear>=24.0.0; extra == 'black'
|
68
|
+
Requires-Dist: flake8-builtins>=2.1.0; extra == 'black'
|
69
|
+
Requires-Dist: flake8-comprehensions>=3.14.0; extra == 'black'
|
70
|
+
Requires-Dist: flake8-debugger>=4.1.2; extra == 'black'
|
71
|
+
Requires-Dist: flake8-docstrings>=1.7.0; extra == 'black'
|
72
|
+
Requires-Dist: flake8-executable>=2.1.3; extra == 'black'
|
73
|
+
Requires-Dist: flake8-pep3101>=2.0.0; extra == 'black'
|
74
|
+
Requires-Dist: flake8-print>=5.0.0; extra == 'black'
|
75
|
+
Requires-Dist: flake8-pyproject>=1.2.3; extra == 'black'
|
76
|
+
Requires-Dist: flake8-rst-docstrings>=0.3.0; extra == 'black'
|
77
|
+
Requires-Dist: flake8-string-format>=0.3.0; extra == 'black'
|
78
|
+
Requires-Dist: isort>=5.12.0; extra == 'black'
|
79
|
+
Requires-Dist: pep8-naming>=0.14.0; extra == 'black'
|
80
|
+
Requires-Dist: pycodestyle>=2.11.0; extra == 'black'
|
53
81
|
Provides-Extra: ruff
|
54
82
|
Requires-Dist: mdformat-ruff>=0.1.3; extra == 'ruff'
|
55
83
|
Requires-Dist: ruff>=0.7.2; extra == 'ruff'
|
@@ -72,7 +100,6 @@ all necessary tools are installed as dependencies.
|
|
72
100
|
- [Requirement](#requirement)
|
73
101
|
- [Usage](#usage)
|
74
102
|
- [Install pyproject-pre-commit](#install-pyproject-pre-commit)
|
75
|
-
- [Install pyproject-pre-commit with ruff](#install-pyproject-pre-commit-with-ruff)
|
76
103
|
- [Prepare .pre-commit-config.yaml](#prepare-pre-commit-configyaml)
|
77
104
|
- [Run pre-commit](#run-pre-commit)
|
78
105
|
- [Available ids](#available-ids)
|
@@ -84,7 +111,6 @@ all necessary tools are installed as dependencies.
|
|
84
111
|
## Requirement<a name="requirement"></a>
|
85
112
|
|
86
113
|
- Python >= 3.9.0
|
87
|
-
- Poetry (For development)
|
88
114
|
|
89
115
|
## Usage<a name="usage"></a>
|
90
116
|
|
@@ -93,32 +119,40 @@ all necessary tools are installed as dependencies.
|
|
93
119
|
If your project uses poetry, do:
|
94
120
|
|
95
121
|
```
|
96
|
-
$ poetry add --group dev pyproject-pre-commit
|
122
|
+
$ poetry add --group dev pyproject-pre-commit[ruff]
|
97
123
|
```
|
98
124
|
|
99
|
-
|
100
|
-
|
101
|
-
If you use pip, do:
|
125
|
+
or uv, do:
|
102
126
|
|
103
127
|
```
|
104
|
-
$
|
128
|
+
$ poetry add --dev pyproject-pre-commit[ruff]
|
105
129
|
```
|
106
130
|
|
107
|
-
|
108
|
-
so that you can use these tools, such as black, directly.
|
131
|
+
You can choose `ruff` or `black` as main linter/formatter by option.
|
109
132
|
|
110
|
-
|
133
|
+
If you want to use `black`, do:
|
134
|
+
|
135
|
+
```
|
136
|
+
$ poetry add --dev pyproject-pre-commit[black]
|
137
|
+
```
|
111
138
|
|
112
|
-
|
139
|
+
For `black` case, `autoflake`, `autopep8`, `isort`, `flake8` and `bandit` are also installed.
|
140
|
+
|
141
|
+
If you wish to install all, do:
|
113
142
|
|
114
143
|
```
|
115
|
-
$ poetry add --
|
144
|
+
$ poetry add --dev pyproject-pre-commit[all]
|
116
145
|
```
|
117
146
|
|
147
|
+
If you use pip, do:
|
148
|
+
|
118
149
|
```
|
119
150
|
$ pip install pyproject-pre-commit[ruff]
|
120
151
|
```
|
121
152
|
|
153
|
+
This will install tools for pre-commit hooks in your working environment,
|
154
|
+
so that you can use these tools, such as black, directly.
|
155
|
+
|
122
156
|
### Prepare .pre-commit-config.yaml<a name="prepare-pre-commit-configyaml"></a>
|
123
157
|
|
124
158
|
Add **https://github.com/rcmdnk/pyproject-pre-commit** to your **.pre-commit-config.yaml**, like:
|
@@ -143,6 +177,8 @@ repos:
|
|
143
177
|
- id: shellcheck
|
144
178
|
- id: mdformat-check
|
145
179
|
- id: mdformat
|
180
|
+
- id: actionlint
|
181
|
+
- id: validate-pyproject
|
146
182
|
```
|
147
183
|
|
148
184
|
By using **pyproject-pre-commit**, you can simplify your **.pre-commit-config.yaml**
|
@@ -157,7 +193,7 @@ This can be made by `ppc` command:
|
|
157
193
|
$ ppc --pre-commit > .pre-commit-config.yaml
|
158
194
|
```
|
159
195
|
|
160
|
-
>
|
196
|
+
> [!NOTE]
|
161
197
|
> If you are using poetry, run `poetry run ppc ... ` or run after `poetry shell`.
|
162
198
|
|
163
199
|
If you already have it, add hooks w/o `repos:` by
|
@@ -183,6 +219,8 @@ repos:
|
|
183
219
|
- id: shellcheck
|
184
220
|
- id: mdformat-check
|
185
221
|
- id: mdformat
|
222
|
+
- id: actionlint
|
223
|
+
- id: validate-pyproject
|
186
224
|
```
|
187
225
|
|
188
226
|
This can be made by `ppc` command:
|
@@ -209,7 +247,7 @@ then you can run pre-commit by:
|
|
209
247
|
$ pre-commit run --all-files
|
210
248
|
```
|
211
249
|
|
212
|
-
>
|
250
|
+
> [!NOTE]
|
213
251
|
> If you are using poetry, run `poetry run pre-commit ... ` or run after `poetry shell`.
|
214
252
|
|
215
253
|
## Available ids<a name="available-ids"></a>
|
@@ -259,6 +297,10 @@ There are ids for following tools:
|
|
259
297
|
- [mdformat-gfm](https://github.com/hukkin/mdformat-gfm)
|
260
298
|
- [mdformat-frontmatter](https://github.com/butler54/mdformat-frontmatter)
|
261
299
|
- [mdformat-footnote](https://github.com/executablebooks/mdformat-footnote)
|
300
|
+
- For GitHub Actions
|
301
|
+
- [actionlint](https://github.com/Mateusz-Grzelinski/actionlint-py): Lint GitHub workflows with actionlint.
|
302
|
+
- For pyproject.toml
|
303
|
+
- [validate-pyproject](https://github.com/abravalheri/validate-pyproject): Validate pyproject.toml file.
|
262
304
|
|
263
305
|
All tools are installed as dependencies of **pyproject-pre-commit** package.
|
264
306
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
pyproject_pre_commit/__init__.py,sha256=rUeC_hXVqI0tVQ-QyGHvz0r9qkZHCG2D0Mql5Wu5udc,111
|
2
|
+
pyproject_pre_commit/__version__.py,sha256=IHT4mKrIr8eV-C3HtmIVD85iGVH25n2ohoff31kaJ1A,93
|
3
|
+
pyproject_pre_commit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
pyproject_pre_commit/pyproject_pre_commit.py,sha256=VJPy9QcGiTYtJXprg7KfwAmY2HLFYTBXjoftfzYVoiw,4395
|
5
|
+
pyproject_pre_commit-0.4.0.dist-info/METADATA,sha256=wt0OiUjxiLEmUny0O00h8qp3_FGCL8R9F8Or1ZzttdQ,12933
|
6
|
+
pyproject_pre_commit-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
+
pyproject_pre_commit-0.4.0.dist-info/entry_points.txt,sha256=SWEvPSMZ57o6ihwt-tVBkwQzvuq1Zk_Re4RJWtvM5Rw,50
|
8
|
+
pyproject_pre_commit-0.4.0.dist-info/licenses/LICENSE,sha256=KPHimGp4ehdaHn7s0RrnWAqKefaRTu5b_zUz7cGVuo8,11337
|
9
|
+
pyproject_pre_commit-0.4.0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
pyproject_pre_commit/__init__.py,sha256=rUeC_hXVqI0tVQ-QyGHvz0r9qkZHCG2D0Mql5Wu5udc,111
|
2
|
-
pyproject_pre_commit/__version__.py,sha256=IHT4mKrIr8eV-C3HtmIVD85iGVH25n2ohoff31kaJ1A,93
|
3
|
-
pyproject_pre_commit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
pyproject_pre_commit/pyproject_pre_commit.py,sha256=AeMBDaJrcSyEVxB3g5V5d79ZvN_7zhyeEpr5mWP6Oyw,3962
|
5
|
-
pyproject_pre_commit-0.3.4.dist-info/METADATA,sha256=NboKikhkBiGL9l_wwVA0WjzFPE1idAUI210I28KkYMw,10881
|
6
|
-
pyproject_pre_commit-0.3.4.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
|
7
|
-
pyproject_pre_commit-0.3.4.dist-info/entry_points.txt,sha256=SWEvPSMZ57o6ihwt-tVBkwQzvuq1Zk_Re4RJWtvM5Rw,50
|
8
|
-
pyproject_pre_commit-0.3.4.dist-info/licenses/LICENSE,sha256=KPHimGp4ehdaHn7s0RrnWAqKefaRTu5b_zUz7cGVuo8,11337
|
9
|
-
pyproject_pre_commit-0.3.4.dist-info/RECORD,,
|
{pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/entry_points.txt
RENAMED
File without changes
|
{pyproject_pre_commit-0.3.4.dist-info → pyproject_pre_commit-0.4.0.dist-info}/licenses/LICENSE
RENAMED
File without changes
|