pyproject-pre-commit 0.3.1__py3-none-any.whl → 0.3.3__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-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/METADATA +61 -42
- {pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/RECORD +5 -5
- {pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/WHEEL +1 -1
- {pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/entry_points.txt +0 -0
- {pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,10 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pyproject-pre-commit
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.3
|
4
4
|
Summary: pre-commit hooks for python projects using pyproject.toml.
|
5
5
|
Author-email: rcmdnk <rcmdnk@gmail.com>
|
6
|
-
License-Expression: Apache-2.0
|
7
|
-
License-File: LICENSE
|
8
6
|
Keywords: pre-commit,pyproject.toml,uv
|
9
7
|
Classifier: Development Status :: 3 - Alpha
|
10
8
|
Classifier: Environment :: Console
|
@@ -32,9 +30,15 @@ Requires-Dist: flake8-pyproject>=1.2.3
|
|
32
30
|
Requires-Dist: flake8-rst-docstrings>=0.3.0
|
33
31
|
Requires-Dist: flake8-string-format>=0.3.0
|
34
32
|
Requires-Dist: isort>=5.12.0
|
33
|
+
Requires-Dist: mdformat-config>=0.2.1
|
35
34
|
Requires-Dist: mdformat-footnote>=0.1.1
|
36
35
|
Requires-Dist: mdformat-frontmatter>=2.0.1
|
37
36
|
Requires-Dist: mdformat-gfm>=0.3.5
|
37
|
+
Requires-Dist: mdformat-pyproject>=0.0.1
|
38
|
+
Requires-Dist: mdformat-rustfmt>=0.0.3
|
39
|
+
Requires-Dist: mdformat-tables>=1.0.0
|
40
|
+
Requires-Dist: mdformat-toc>=0.3.0
|
41
|
+
Requires-Dist: mdformat-web>=0.2.0
|
38
42
|
Requires-Dist: mdformat>=0.7.17
|
39
43
|
Requires-Dist: mypy>=1.5.1
|
40
44
|
Requires-Dist: numpydoc>=1.8.0
|
@@ -43,10 +47,11 @@ Requires-Dist: pre-commit>=4.0.0
|
|
43
47
|
Requires-Dist: pycodestyle>=2.11.0
|
44
48
|
Requires-Dist: shellcheck-py>=0.9.0.5
|
45
49
|
Provides-Extra: ruff
|
50
|
+
Requires-Dist: mdformat-ruff>=0.1.3; extra == 'ruff'
|
46
51
|
Requires-Dist: ruff>=0.7.2; extra == 'ruff'
|
47
52
|
Description-Content-Type: text/markdown
|
48
53
|
|
49
|
-
# pyproject-pre-commit
|
54
|
+
# pyproject-pre-commit<a name="pyproject-pre-commit"></a>
|
50
55
|
|
51
56
|
[](https://github.com/rcmdnk/pyproject-pre-commit/actions/workflows/test.yml)
|
52
57
|
[](https://github.com/rcmdnk/pyproject-pre-commit/tree/coverage)
|
@@ -58,14 +63,28 @@ Description-Content-Type: text/markdown
|
|
58
63
|
By installing **pyproject-pre-commit** package,
|
59
64
|
all necessary tools are installed as dependencies.
|
60
65
|
|
61
|
-
|
66
|
+
<!-- mdformat-toc start --slug=github --maxlevel=6 --minlevel=2 -->
|
67
|
+
|
68
|
+
- [Requirement](#requirement)
|
69
|
+
- [Usage](#usage)
|
70
|
+
- [Install pyproject-pre-commit](#install-pyproject-pre-commit)
|
71
|
+
- [Install pyproject-pre-commit with ruff](#install-pyproject-pre-commit-with-ruff)
|
72
|
+
- [Prepare .pre-commit-config.yaml](#prepare-pre-commit-configyaml)
|
73
|
+
- [Run pre-commit](#run-pre-commit)
|
74
|
+
- [Available ids](#available-ids)
|
75
|
+
- [Options for tools](#options-for-tools)
|
76
|
+
- [pyproject.toml](#pyprojecttoml)
|
77
|
+
|
78
|
+
<!-- mdformat-toc end -->
|
79
|
+
|
80
|
+
## Requirement<a name="requirement"></a>
|
62
81
|
|
63
82
|
- Python >= 3.9.0
|
64
83
|
- Poetry (For development)
|
65
84
|
|
66
|
-
## Usage
|
85
|
+
## Usage<a name="usage"></a>
|
67
86
|
|
68
|
-
### Install pyproject-pre-commit
|
87
|
+
### Install pyproject-pre-commit<a name="install-pyproject-pre-commit"></a>
|
69
88
|
|
70
89
|
If your project uses poetry, do:
|
71
90
|
|
@@ -84,7 +103,7 @@ $ pip install pyproject-pre-commit
|
|
84
103
|
This will install tools for pre-commit hooks in your working environment,
|
85
104
|
so that you can use these tools, such as black, directly.
|
86
105
|
|
87
|
-
### Install pyproject-pre-commit with ruff
|
106
|
+
### Install pyproject-pre-commit with ruff<a name="install-pyproject-pre-commit-with-ruff"></a>
|
88
107
|
|
89
108
|
If you want to use ruff, you can install pyproject-pre-commit with ruff option.
|
90
109
|
|
@@ -96,30 +115,30 @@ $ poetry add --group dev "pyproject-pre-commit[ruff]"
|
|
96
115
|
$ pip install pyproject-pre-commit[ruff]
|
97
116
|
```
|
98
117
|
|
99
|
-
### Prepare .pre-commit-config.yaml
|
118
|
+
### Prepare .pre-commit-config.yaml<a name="prepare-pre-commit-configyaml"></a>
|
100
119
|
|
101
120
|
Add **https://github.com/rcmdnk/pyproject-pre-commit** to your **.pre-commit-config.yaml**, like:
|
102
121
|
|
103
122
|
```yaml
|
104
123
|
repos:
|
105
|
-
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
124
|
+
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
125
|
+
rev: v0.3.0
|
126
|
+
hooks:
|
127
|
+
- id: black-diff
|
128
|
+
- id: black
|
129
|
+
- id: blacken-docs
|
130
|
+
- id: autoflake-diff
|
131
|
+
- id: autoflake
|
132
|
+
- id: autopep8-diff
|
133
|
+
- id: autopep8
|
134
|
+
- id: isort-diff
|
135
|
+
- id: isort
|
136
|
+
- id: flake8
|
137
|
+
- id: bandit
|
138
|
+
- id: mypy
|
139
|
+
- id: shellcheck
|
140
|
+
- id: mdformat-check
|
141
|
+
- id: mdformat
|
123
142
|
```
|
124
143
|
|
125
144
|
By using **pyproject-pre-commit**, you can simplify your **.pre-commit-config.yaml**
|
@@ -149,17 +168,17 @@ To use `ruff` instead of such as `black`, `flake8`, `isort`, add following hooks
|
|
149
168
|
|
150
169
|
```yaml
|
151
170
|
repos:
|
152
|
-
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
171
|
+
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
172
|
+
rev: v0.3.0
|
173
|
+
hooks:
|
174
|
+
- id: ruff-lint-diff
|
175
|
+
- id: ruff-lint
|
176
|
+
- id: ruff-format-diff
|
177
|
+
- id: ruff-format
|
178
|
+
- id: mypy
|
179
|
+
- id: shellcheck
|
180
|
+
- id: mdformat-check
|
181
|
+
- id: mdformat
|
163
182
|
```
|
164
183
|
|
165
184
|
This can be made by `ppc` command:
|
@@ -168,7 +187,7 @@ This can be made by `ppc` command:
|
|
168
187
|
$ ppc --pre-commit --ruff > .pre-commit-config.yaml
|
169
188
|
```
|
170
189
|
|
171
|
-
### Run pre-commit
|
190
|
+
### Run pre-commit<a name="run-pre-commit"></a>
|
172
191
|
|
173
192
|
`pre-commit` command is installed as dependencies of **pyproject-pre-commit** package.
|
174
193
|
|
@@ -189,7 +208,7 @@ $ pre-commit run --all-files
|
|
189
208
|
> \[!NOTE\]
|
190
209
|
> If you are using poetry, run `poetry run pre-commit ... ` or run after `poetry shell`.
|
191
210
|
|
192
|
-
## Available ids
|
211
|
+
## Available ids<a name="available-ids"></a>
|
193
212
|
|
194
213
|
You can find ids in **.pre-commit-hooks.yaml**.
|
195
214
|
|
@@ -247,7 +266,7 @@ For tools which can format files, there are additional ids with `-diff` or `--ch
|
|
247
266
|
which show the results before modifying files.
|
248
267
|
You can see the differences after formatting if you place these ids before ids w/o `--diff` or `--check`.
|
249
268
|
|
250
|
-
## Options for tools
|
269
|
+
## Options for tools<a name="options-for-tools"></a>
|
251
270
|
|
252
271
|
You can set options in pyproject.toml for all tools above.
|
253
272
|
|
@@ -255,7 +274,7 @@ For flake8, flake8-pyproject allows to read options from pyproject.toml
|
|
255
274
|
|
256
275
|
About bandit, there is a plugin for the flake8, but plugin version does not read options from pyproject.toml even with pyproject.toml. Therefore, use bandit directly and give `-c pyproject.toml` option in the hooks.
|
257
276
|
|
258
|
-
## pyproject.toml
|
277
|
+
## pyproject.toml<a name="pyprojecttoml"></a>
|
259
278
|
|
260
279
|
You can set options in pyproject.toml for all tools.
|
261
280
|
|
@@ -2,8 +2,8 @@ pyproject_pre_commit/__init__.py,sha256=rUeC_hXVqI0tVQ-QyGHvz0r9qkZHCG2D0Mql5Wu5
|
|
2
2
|
pyproject_pre_commit/__version__.py,sha256=IHT4mKrIr8eV-C3HtmIVD85iGVH25n2ohoff31kaJ1A,93
|
3
3
|
pyproject_pre_commit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
pyproject_pre_commit/pyproject_pre_commit.py,sha256=AeMBDaJrcSyEVxB3g5V5d79ZvN_7zhyeEpr5mWP6Oyw,3962
|
5
|
-
pyproject_pre_commit-0.3.
|
6
|
-
pyproject_pre_commit-0.3.
|
7
|
-
pyproject_pre_commit-0.3.
|
8
|
-
pyproject_pre_commit-0.3.
|
9
|
-
pyproject_pre_commit-0.3.
|
5
|
+
pyproject_pre_commit-0.3.3.dist-info/METADATA,sha256=t5FnSLafDNSO4NKnABlIIohNxNxVDb5UncEZnJc1JyY,10619
|
6
|
+
pyproject_pre_commit-0.3.3.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
|
7
|
+
pyproject_pre_commit-0.3.3.dist-info/entry_points.txt,sha256=SWEvPSMZ57o6ihwt-tVBkwQzvuq1Zk_Re4RJWtvM5Rw,50
|
8
|
+
pyproject_pre_commit-0.3.3.dist-info/licenses/LICENSE,sha256=KPHimGp4ehdaHn7s0RrnWAqKefaRTu5b_zUz7cGVuo8,11337
|
9
|
+
pyproject_pre_commit-0.3.3.dist-info/RECORD,,
|
{pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/entry_points.txt
RENAMED
File without changes
|
{pyproject_pre_commit-0.3.1.dist-info → pyproject_pre_commit-0.3.3.dist-info}/licenses/LICENSE
RENAMED
File without changes
|