pyproject-pre-commit 0.3.0__py3-none-any.whl → 0.3.2__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.0.dist-info → pyproject_pre_commit-0.3.2.dist-info}/METADATA +51 -8
- pyproject_pre_commit-0.3.2.dist-info/RECORD +9 -0
- {pyproject_pre_commit-0.3.0.dist-info → pyproject_pre_commit-0.3.2.dist-info}/WHEEL +1 -1
- pyproject_pre_commit-0.3.2.dist-info/entry_points.txt +2 -0
- pyproject_pre_commit-0.3.0.dist-info/RECORD +0 -8
- {pyproject_pre_commit-0.3.0.dist-info → pyproject_pre_commit-0.3.2.dist-info}/licenses/LICENSE +0 -0
@@ -1,11 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pyproject-pre-commit
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: pre-commit hooks for python projects using pyproject.toml.
|
5
5
|
Author-email: rcmdnk <rcmdnk@gmail.com>
|
6
|
-
|
7
|
-
License-File: LICENSE
|
8
|
-
Keywords: poetry,pre-commit,pyproject.toml
|
6
|
+
Keywords: pre-commit,pyproject.toml,uv
|
9
7
|
Classifier: Development Status :: 3 - Alpha
|
10
8
|
Classifier: Environment :: Console
|
11
9
|
Classifier: Intended Audience :: Developers
|
@@ -84,6 +82,18 @@ $ pip install pyproject-pre-commit
|
|
84
82
|
This will install tools for pre-commit hooks in your working environment,
|
85
83
|
so that you can use these tools, such as black, directly.
|
86
84
|
|
85
|
+
### Install pyproject-pre-commit with ruff
|
86
|
+
|
87
|
+
If you want to use ruff, you can install pyproject-pre-commit with ruff option.
|
88
|
+
|
89
|
+
```
|
90
|
+
$ poetry add --group dev "pyproject-pre-commit[ruff]"
|
91
|
+
```
|
92
|
+
|
93
|
+
```
|
94
|
+
$ pip install pyproject-pre-commit[ruff]
|
95
|
+
```
|
96
|
+
|
87
97
|
### Prepare .pre-commit-config.yaml
|
88
98
|
|
89
99
|
Add **https://github.com/rcmdnk/pyproject-pre-commit** to your **.pre-commit-config.yaml**, like:
|
@@ -133,6 +143,29 @@ $ ppc --pre-commit |grep -v "^repos:" >> .pre-commit-config.yaml
|
|
133
143
|
|
134
144
|
You may want to modify after adding these configurations.
|
135
145
|
|
146
|
+
To use `ruff` instead of such as `black`, `flake8`, `isort`, add following hooks:
|
147
|
+
|
148
|
+
```yaml
|
149
|
+
repos:
|
150
|
+
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
151
|
+
rev: v0.3.0
|
152
|
+
hooks:
|
153
|
+
- id: ruff-lint-diff
|
154
|
+
- id: ruff-lint
|
155
|
+
- id: ruff-format-diff
|
156
|
+
- id: ruff-format
|
157
|
+
- id: mypy
|
158
|
+
- id: shellcheck
|
159
|
+
- id: mdformat-check
|
160
|
+
- id: mdformat
|
161
|
+
```
|
162
|
+
|
163
|
+
This can be made by `ppc` command:
|
164
|
+
|
165
|
+
```
|
166
|
+
$ ppc --pre-commit --ruff > .pre-commit-config.yaml
|
167
|
+
```
|
168
|
+
|
136
169
|
### Run pre-commit
|
137
170
|
|
138
171
|
`pre-commit` command is installed as dependencies of **pyproject-pre-commit** package.
|
@@ -161,14 +194,14 @@ You can find ids in **.pre-commit-hooks.yaml**.
|
|
161
194
|
There are ids for following tools:
|
162
195
|
|
163
196
|
- For Python
|
164
|
-
- black-diff: Just show Black result.
|
197
|
+
- [black-diff](https://black.readthedocs.io/en/stable): Just show Black result.
|
165
198
|
- [black](https://black.readthedocs.io/en/stable): Black: The uncompromising Python code formatter.
|
166
199
|
- [blacken-docs](https://github.com/adamchainz/blacken-docs): Run `black` on python code blocks in documentation files.
|
167
|
-
- autoflake-diff: Just show autoflake result.
|
200
|
+
- [autoflake-diff](https://github.com/PyCQA/autoflake): Just show autoflake result.
|
168
201
|
- [autoflake](https://github.com/PyCQA/autoflake): autoflake removes unused imports and unused variables from Python code.
|
169
|
-
- autopep8-diff: Just show autopep8.
|
202
|
+
- [autopep8-diff](https://github.com/hhatto/autopep8): Just show autopep8.
|
170
203
|
- [autopep8](https://github.com/hhatto/autopep8): autopep8 automatically formats Python code to conform to the PEP 8 style guide.
|
171
|
-
- isort-diff: Just show isort result.
|
204
|
+
- [isort-diff](https://github.com/PyCQA/isort): Just show isort result.
|
172
205
|
- [isort](https://github.com/PyCQA/isort): isort your imports, so you don't have to.
|
173
206
|
- [flake8](https://github.com/PyCQA/flake8): `flake8` is a command-line utility for enforcing style consistency across Python projects.
|
174
207
|
- With following plugins:
|
@@ -188,6 +221,10 @@ There are ids for following tools:
|
|
188
221
|
- [pycodestyle](https://pycodestyle.pycqa.org/en/latest/)
|
189
222
|
- [bandit](https://github.com/PyCQA/bandit): Bandit is a tool for finding common security issues in Python code.
|
190
223
|
- [mypy](https://www.mypy-lang.org/): Mypy is a static type checker for Python.
|
224
|
+
- [ruff-lint-diff](https://docs.astral.sh/ruff/): Just show ruff check result.
|
225
|
+
- [ruff-lint](https://docs.astral.sh/ruff/): Fix by ruff for lint.
|
226
|
+
- [ruff-format-diff](https://docs.astral.sh/ruff/): Just show ruff format result.
|
227
|
+
- [ruff-format](https://docs.astral.sh/ruff/): Format by ruff.
|
191
228
|
- For Shell script
|
192
229
|
- [shellcheck](https://www.shellcheck.net/): ShellCheck - A shell script static analysis tool
|
193
230
|
- For Markdown
|
@@ -226,4 +263,10 @@ Example options can be made by `ppc` command:
|
|
226
263
|
$ ppc --pyproject >> pyproject.toml
|
227
264
|
```
|
228
265
|
|
266
|
+
or
|
267
|
+
|
268
|
+
```
|
269
|
+
$ ppc --pyproject --ruff >> pyproject.toml
|
270
|
+
```
|
271
|
+
|
229
272
|
You may want to modify after adding these configurations.
|
@@ -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=AeMBDaJrcSyEVxB3g5V5d79ZvN_7zhyeEpr5mWP6Oyw,3962
|
5
|
+
pyproject_pre_commit-0.3.2.dist-info/METADATA,sha256=D8K6em_ZgS5r50oCLcYNDDs0P_vfiX2h7CoKQ0UYjtk,9382
|
6
|
+
pyproject_pre_commit-0.3.2.dist-info/WHEEL,sha256=wukiCwsxxsuzcQTdnC_ZWHZECE4wwOh3xCCrap6i6Ts,87
|
7
|
+
pyproject_pre_commit-0.3.2.dist-info/entry_points.txt,sha256=SWEvPSMZ57o6ihwt-tVBkwQzvuq1Zk_Re4RJWtvM5Rw,50
|
8
|
+
pyproject_pre_commit-0.3.2.dist-info/licenses/LICENSE,sha256=KPHimGp4ehdaHn7s0RrnWAqKefaRTu5b_zUz7cGVuo8,11337
|
9
|
+
pyproject_pre_commit-0.3.2.dist-info/RECORD,,
|
@@ -1,8 +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.0.dist-info/METADATA,sha256=qnV2Ca-wFn_7EAhfsKNRmPHRZQktAh3_mK5Ik7sxwIo,8258
|
6
|
-
pyproject_pre_commit-0.3.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
7
|
-
pyproject_pre_commit-0.3.0.dist-info/licenses/LICENSE,sha256=KPHimGp4ehdaHn7s0RrnWAqKefaRTu5b_zUz7cGVuo8,11337
|
8
|
-
pyproject_pre_commit-0.3.0.dist-info/RECORD,,
|
{pyproject_pre_commit-0.3.0.dist-info → pyproject_pre_commit-0.3.2.dist-info}/licenses/LICENSE
RENAMED
File without changes
|