pyproject-pre-commit 0.3.0__tar.gz → 0.3.1__tar.gz
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 → pyproject_pre_commit-0.3.1}/PKG-INFO +51 -6
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/README.md +49 -4
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/pyproject.toml +5 -8
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.github/FUNDING.yml +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.github/workflows/pypi.yml +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.github/workflows/test.yml +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.gitignore +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.pre-commit-config.yaml +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/.pre-commit-hooks.yaml +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/LICENSE +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/renovate.json +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/__init__.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/__version__.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/py.typed +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/pyproject_pre_commit.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/tests/__init__.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/tests/test_pyproject_pre_commit.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/tests/test_version.py +0 -0
- {pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/uv.lock +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.
|
@@ -36,6 +36,18 @@ $ pip install pyproject-pre-commit
|
|
36
36
|
This will install tools for pre-commit hooks in your working environment,
|
37
37
|
so that you can use these tools, such as black, directly.
|
38
38
|
|
39
|
+
### Install pyproject-pre-commit with ruff
|
40
|
+
|
41
|
+
If you want to use ruff, you can install pyproject-pre-commit with ruff option.
|
42
|
+
|
43
|
+
```
|
44
|
+
$ poetry add --group dev "pyproject-pre-commit[ruff]"
|
45
|
+
```
|
46
|
+
|
47
|
+
```
|
48
|
+
$ pip install pyproject-pre-commit[ruff]
|
49
|
+
```
|
50
|
+
|
39
51
|
### Prepare .pre-commit-config.yaml
|
40
52
|
|
41
53
|
Add **https://github.com/rcmdnk/pyproject-pre-commit** to your **.pre-commit-config.yaml**, like:
|
@@ -85,6 +97,29 @@ $ ppc --pre-commit |grep -v "^repos:" >> .pre-commit-config.yaml
|
|
85
97
|
|
86
98
|
You may want to modify after adding these configurations.
|
87
99
|
|
100
|
+
To use `ruff` instead of such as `black`, `flake8`, `isort`, add following hooks:
|
101
|
+
|
102
|
+
```yaml
|
103
|
+
repos:
|
104
|
+
- repo: https://github.com/rcmdnk/pyproject-pre-commit
|
105
|
+
rev: v0.3.0
|
106
|
+
hooks:
|
107
|
+
- id: ruff-lint-diff
|
108
|
+
- id: ruff-lint
|
109
|
+
- id: ruff-format-diff
|
110
|
+
- id: ruff-format
|
111
|
+
- id: mypy
|
112
|
+
- id: shellcheck
|
113
|
+
- id: mdformat-check
|
114
|
+
- id: mdformat
|
115
|
+
```
|
116
|
+
|
117
|
+
This can be made by `ppc` command:
|
118
|
+
|
119
|
+
```
|
120
|
+
$ ppc --pre-commit --ruff > .pre-commit-config.yaml
|
121
|
+
```
|
122
|
+
|
88
123
|
### Run pre-commit
|
89
124
|
|
90
125
|
`pre-commit` command is installed as dependencies of **pyproject-pre-commit** package.
|
@@ -113,14 +148,14 @@ You can find ids in **.pre-commit-hooks.yaml**.
|
|
113
148
|
There are ids for following tools:
|
114
149
|
|
115
150
|
- For Python
|
116
|
-
- black-diff: Just show Black result.
|
151
|
+
- [black-diff](https://black.readthedocs.io/en/stable): Just show Black result.
|
117
152
|
- [black](https://black.readthedocs.io/en/stable): Black: The uncompromising Python code formatter.
|
118
153
|
- [blacken-docs](https://github.com/adamchainz/blacken-docs): Run `black` on python code blocks in documentation files.
|
119
|
-
- autoflake-diff: Just show autoflake result.
|
154
|
+
- [autoflake-diff](https://github.com/PyCQA/autoflake): Just show autoflake result.
|
120
155
|
- [autoflake](https://github.com/PyCQA/autoflake): autoflake removes unused imports and unused variables from Python code.
|
121
|
-
- autopep8-diff: Just show autopep8.
|
156
|
+
- [autopep8-diff](https://github.com/hhatto/autopep8): Just show autopep8.
|
122
157
|
- [autopep8](https://github.com/hhatto/autopep8): autopep8 automatically formats Python code to conform to the PEP 8 style guide.
|
123
|
-
- isort-diff: Just show isort result.
|
158
|
+
- [isort-diff](https://github.com/PyCQA/isort): Just show isort result.
|
124
159
|
- [isort](https://github.com/PyCQA/isort): isort your imports, so you don't have to.
|
125
160
|
- [flake8](https://github.com/PyCQA/flake8): `flake8` is a command-line utility for enforcing style consistency across Python projects.
|
126
161
|
- With following plugins:
|
@@ -140,6 +175,10 @@ There are ids for following tools:
|
|
140
175
|
- [pycodestyle](https://pycodestyle.pycqa.org/en/latest/)
|
141
176
|
- [bandit](https://github.com/PyCQA/bandit): Bandit is a tool for finding common security issues in Python code.
|
142
177
|
- [mypy](https://www.mypy-lang.org/): Mypy is a static type checker for Python.
|
178
|
+
- [ruff-lint-diff](https://docs.astral.sh/ruff/): Just show ruff check result.
|
179
|
+
- [ruff-lint](https://docs.astral.sh/ruff/): Fix by ruff for lint.
|
180
|
+
- [ruff-format-diff](https://docs.astral.sh/ruff/): Just show ruff format result.
|
181
|
+
- [ruff-format](https://docs.astral.sh/ruff/): Format by ruff.
|
143
182
|
- For Shell script
|
144
183
|
- [shellcheck](https://www.shellcheck.net/): ShellCheck - A shell script static analysis tool
|
145
184
|
- For Markdown
|
@@ -178,4 +217,10 @@ Example options can be made by `ppc` command:
|
|
178
217
|
$ ppc --pyproject >> pyproject.toml
|
179
218
|
```
|
180
219
|
|
220
|
+
or
|
221
|
+
|
222
|
+
```
|
223
|
+
$ ppc --pyproject --ruff >> pyproject.toml
|
224
|
+
```
|
225
|
+
|
181
226
|
You may want to modify after adding these configurations.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "pyproject-pre-commit"
|
3
|
-
version = "0.3.
|
3
|
+
version = "0.3.1"
|
4
4
|
description = "pre-commit hooks for python projects using pyproject.toml."
|
5
5
|
authors = [
|
6
6
|
{ name = "rcmdnk", email = "rcmdnk@gmail.com" }
|
@@ -9,7 +9,7 @@ repository = "https://github.com/rcmdnk/pyproject-pre-commit"
|
|
9
9
|
homepage = "https://github.com/rcmdnk/pyproject-pre-commit"
|
10
10
|
readme = "README.md"
|
11
11
|
license = "Apache-2.0"
|
12
|
-
keywords = ["pre-commit", "pyproject.toml", "
|
12
|
+
keywords = ["pre-commit", "pyproject.toml", "uv"]
|
13
13
|
classifiers = [
|
14
14
|
"Development Status :: 3 - Alpha",
|
15
15
|
"Environment :: Console",
|
@@ -56,9 +56,6 @@ ruff = [
|
|
56
56
|
"ruff >= 0.7.2",
|
57
57
|
]
|
58
58
|
|
59
|
-
[tool.poetry.extras]
|
60
|
-
ruff = ["ruff"]
|
61
|
-
|
62
59
|
[dependency-groups]
|
63
60
|
dev = [
|
64
61
|
"pytest >= 8.0.0",
|
@@ -67,6 +64,9 @@ dev = [
|
|
67
64
|
"ruff >= 0.7.2",
|
68
65
|
]
|
69
66
|
|
67
|
+
[project.scripts]
|
68
|
+
ppc = "pyproject_pre_commit:main"
|
69
|
+
|
70
70
|
[build-system]
|
71
71
|
requires = ["hatchling"]
|
72
72
|
build-backend = "hatchling.build"
|
@@ -171,6 +171,3 @@ checks = [
|
|
171
171
|
"PR02", # "Unknown parameters {unknown_params}"
|
172
172
|
"RT01", # "No Returns section found"
|
173
173
|
]
|
174
|
-
|
175
|
-
[tool.poetry.scripts]
|
176
|
-
ppc = "pyproject_pre_commit:main"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/__init__.py
RENAMED
File without changes
|
{pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/src/pyproject_pre_commit/__version__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pyproject_pre_commit-0.3.0 → pyproject_pre_commit-0.3.1}/tests/test_pyproject_pre_commit.py
RENAMED
File without changes
|
File without changes
|
File without changes
|