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