pre-commit-uv 4.3.0__tar.gz → 4.4.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.
@@ -4,3 +4,4 @@
4
4
  __pycache__
5
5
  **.pyc
6
6
  dist
7
+ /uv.lock
@@ -0,0 +1,185 @@
1
+ # Changelog
2
+
3
+ <!-- towncrier release notes start -->
4
+
5
+ <a name="release-4-4-1"></a>
6
+
7
+ ## 4.4.1 (2026-10-27)
8
+
9
+ <a name="release-4-4-1-fixed"></a>
10
+
11
+ ### Fixed
12
+
13
+ - Fix repository links in the PyPI project description ([#190](https://github.com/tox-dev/pre-commit-uv/pull/190)) by
14
+ [@gaborbernat](https://github.com/gaborbernat).
15
+
16
+ <a name="release-4-4-0"></a>
17
+
18
+ ## 4.4.0 (2026-10-10)
19
+
20
+ <a name="release-4-4-0-added"></a>
21
+
22
+ ### Added
23
+
24
+ - Require Python 3.11 or newer ([#183](https://github.com/tox-dev/pre-commit-uv/pull/183)) by
25
+ [@gaborbernat](https://github.com/gaborbernat).
26
+ - Use Python 3.15 by default ([#183](https://github.com/tox-dev/pre-commit-uv/pull/183)) by
27
+ [@gaborbernat](https://github.com/gaborbernat).
28
+
29
+ <a name="release-4-3-0"></a>
30
+
31
+ ## 4.3.0 (2026-07-20)
32
+
33
+ <a name="release-4-3-0-added"></a>
34
+
35
+ ### Added
36
+
37
+ - Support Python 3.15 ([#164](https://github.com/tox-dev/pre-commit-uv/pull/164)) by
38
+ [@gaborbernat](https://github.com/gaborbernat).
39
+
40
+ <a name="release-4-2-2"></a>
41
+
42
+ ## 4.2.2 (2026-06-19)
43
+
44
+ <a name="release-4-2-2-fixed"></a>
45
+
46
+ ### Fixed
47
+
48
+ - Handle truncated `version_info` values in uv's `pyvenv.cfg`
49
+ ([#153](https://github.com/tox-dev/pre-commit-uv/pull/153)) by [@gaborbernat](https://github.com/gaborbernat).
50
+
51
+ <a name="release-4-2-1"></a>
52
+
53
+ ## 4.2.1 (2026-02-18)
54
+
55
+ <a name="release-4-2-1-fixed"></a>
56
+
57
+ ### Fixed
58
+
59
+ - Seed pip into hook environments ([#114](https://github.com/tox-dev/pre-commit-uv/pull/114)) by
60
+ [@gaborbernat](https://github.com/gaborbernat).
61
+ - Detect calls through `python -m pre_commit` ([#115](https://github.com/tox-dev/pre-commit-uv/pull/115)) by
62
+ [@gaborbernat](https://github.com/gaborbernat).
63
+
64
+ <a name="release-4-2-0"></a>
65
+
66
+ ## 4.2.0 (2025-10-09)
67
+
68
+ <a name="release-4-2-0-added"></a>
69
+
70
+ ### Added
71
+
72
+ - Support Python 3.14 ([#86](https://github.com/tox-dev/pre-commit-uv/pull/86)) by
73
+ [@ssbarnea](https://github.com/ssbarnea).
74
+ - End Python 3.9 support ([#91](https://github.com/tox-dev/pre-commit-uv/pull/91)) by
75
+ [@gaborbernat](https://github.com/gaborbernat).
76
+
77
+ <a name="release-4-1-5"></a>
78
+
79
+ ## 4.1.5 (2025-08-27)
80
+
81
+ <a name="release-4-1-5-changes"></a>
82
+
83
+ ### Changes
84
+
85
+ - Use the current project's uv configuration ([#79](https://github.com/tox-dev/pre-commit-uv/pull/79)) by
86
+ [@aaravind100](https://github.com/aaravind100).
87
+
88
+ <a name="release-4-1-4"></a>
89
+
90
+ ## 4.1.4 (2024-10-29)
91
+
92
+ <a name="release-4-1-4-fixed"></a>
93
+
94
+ ### Fixed
95
+
96
+ - Respect `UV_PYTHON` and fall back to `sys.executable` ([#29](https://github.com/tox-dev/pre-commit-uv/pull/29)) by
97
+ [@gaborbernat](https://github.com/gaborbernat).
98
+
99
+ <a name="release-4-1-3"></a>
100
+
101
+ ## 4.1.3 (2024-09-23)
102
+
103
+ <a name="release-4-1-3-fixed"></a>
104
+
105
+ ### Fixed
106
+
107
+ - Patch pre-commit when invoked by `git commit` ([#18](https://github.com/tox-dev/pre-commit-uv/pull/18)) by
108
+ [@florianfischer91](https://github.com/florianfischer91).
109
+
110
+ <a name="release-4-1-2"></a>
111
+
112
+ ## 4.1.2 (2024-09-18)
113
+
114
+ <a name="release-4-1-1"></a>
115
+
116
+ ## 4.1.1 (2024-09-08)
117
+
118
+ <a name="release-4-1-1-added"></a>
119
+
120
+ ### Added
121
+
122
+ - Support Python 3.13 ([#12](https://github.com/tox-dev/pre-commit-uv/pull/12)) by
123
+ [@gaborbernat](https://github.com/gaborbernat).
124
+
125
+ <a name="release-4-1-0"></a>
126
+
127
+ ## 4.1.0 (2024-08-12)
128
+
129
+ <a name="release-4-1-0-changes"></a>
130
+
131
+ ### Changes
132
+
133
+ - Show pre-commit-uv and uv versions in `--version` output ([#7](https://github.com/tox-dev/pre-commit-uv/pull/7)) by
134
+ [@gaborbernat](https://github.com/gaborbernat).
135
+
136
+ <a name="release-4-0-3"></a>
137
+
138
+ ## 4.0.3 (2024-08-08)
139
+
140
+ <a name="release-4-0-3-fixed"></a>
141
+
142
+ ### Fixed
143
+
144
+ - Pass the caller's Python to uv ([#5](https://github.com/tox-dev/pre-commit-uv/pull/5)) by
145
+ [@gaborbernat](https://github.com/gaborbernat).
146
+
147
+ <a name="release-4-0-2"></a>
148
+
149
+ ## 4.0.2 (2024-08-07)
150
+
151
+ <a name="release-4-0-2-documentation"></a>
152
+
153
+ ### Documentation
154
+
155
+ - Add installation instructions ([commit](https://github.com/tox-dev/pre-commit-uv/commit/fdb8619)) by
156
+ [@gaborbernat](https://github.com/gaborbernat).
157
+
158
+ <a name="release-4-0-1"></a>
159
+
160
+ ## 4.0.1 (2024-08-07)
161
+
162
+ <a name="release-4-0-1-performance"></a>
163
+
164
+ ### Performance
165
+
166
+ - Avoid patching import overhead ([#2](https://github.com/tox-dev/pre-commit-uv/pull/2)) by
167
+ [@gaborbernat](https://github.com/gaborbernat).
168
+
169
+ <a name="release-4-0-1-documentation"></a>
170
+
171
+ ### Documentation
172
+
173
+ - Extend the README ([#2](https://github.com/tox-dev/pre-commit-uv/pull/2)) by
174
+ [@gaborbernat](https://github.com/gaborbernat).
175
+
176
+ <a name="release-4-0-0"></a>
177
+
178
+ ## 4.0.0 (2024-08-05)
179
+
180
+ <a name="release-4-0-0-added"></a>
181
+
182
+ ### Added
183
+
184
+ - Publish the first pre-commit-uv release ([#1](https://github.com/tox-dev/pre-commit-uv/pull/1)) by
185
+ [@gaborbernat](https://github.com/gaborbernat).
@@ -0,0 +1,40 @@
1
+ # Contributing
2
+
3
+ ## Check a change
4
+
5
+ Use tox for the Python test matrix and package checks:
6
+
7
+ ```bash
8
+ tox run -e 3.15,type,pkg_meta
9
+ tox run -e fix
10
+ ```
11
+
12
+ The `pkg_meta` environment builds an sdist and wheel, then runs Twine and check-wheel-contents on them. The pull request
13
+ workflow also tests Python 3.11 through 3.15 and free-threaded 3.15.
14
+
15
+ ## Add release news
16
+
17
+ For a change that affects users, add a Markdown fragment such as `changelog.d/+seed-pip.bugfix.md`:
18
+
19
+ ```markdown
20
+ Seed pip into hook environments that need it.
21
+ ```
22
+
23
+ Use one fragment per distinct change; a pull request may include several fragments in different categories. Choose
24
+ `feature` for new behavior or Python support additions and removals, `change` for changed behavior, `bugfix` for fixes,
25
+ and `doc` for user documentation. Use `security`, `performance`, `deprecation`, `removal`, `breaking`, or `packaging`
26
+ only when the change affects users in that way. Leave the pull request number and credits out of the fragment: the
27
+ release adds the squash-merged pull request number and credits the commit's authors and co-authors.
28
+
29
+ For maintenance with no user-facing change, apply the `skip news` label. You can add it after opening the pull request;
30
+ the news check reruns when labels change. Maintenance bot pull requests without fragments receive the label
31
+ automatically. A bot pull request that supplies a fragment must pass the same fragment validation as a human one.
32
+
33
+ ## Make a release
34
+
35
+ Run **Prepare release** on `main`. The default `auto` option selects a major version for a `breaking` fragment, a minor
36
+ version for a `feature` fragment, and a patch version for other categories. The workflow builds and formats
37
+ `CHANGELOG.md`, runs `release-creator contributors` to add new contributors from the commit authors and co-authors, runs
38
+ `prek` on the result, and uses the repository-scoped App to push the release commit and tag. The tag workflow builds the
39
+ distribution, publishes it to PyPI through trusted publishing, then creates the GitHub Release from the tagged
40
+ changelog. The workflow does not ask for a version string.
@@ -1,45 +1,29 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: pre-commit-uv
3
- Version: 4.3.0
3
+ Version: 4.4.1
4
+ Import-Name: pre_commit_uv
4
5
  Summary: Run pre-commit with uv
5
6
  Project-URL: Bug Tracker, https://github.com/tox-dev/pre-commit-uv/issues
6
7
  Project-URL: Source Code, https://github.com/tox-dev/pre-commit-uv
7
- Project-URL: Changelog, https://github.com/tox-dev/pre-commit-uv/releases
8
+ Project-URL: Changelog, https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md
8
9
  Project-URL: Documentation, https://github.com/tox-dev/pre-commit-uv/
9
10
  Author-email: Bernat Gabor <gaborjbernat@gmail.com>
10
- License: Permission is hereby granted, free of charge, to any person obtaining a
11
- copy of this software and associated documentation files (the
12
- "Software"), to deal in the Software without restriction, including
13
- without limitation the rights to use, copy, modify, merge, publish,
14
- distribute, sublicense, and/or sell copies of the Software, and to
15
- permit persons to whom the Software is furnished to do so, subject to
16
- the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included
19
- in all copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11
+ License-Expression: MIT
28
12
  License-File: LICENSE.txt
29
- Keywords: format,pyproject
30
- Classifier: License :: OSI Approved :: MIT License
13
+ Keywords: hooks,pre-commit,uv
14
+ Classifier: Intended Audience :: Developers
31
15
  Classifier: Operating System :: OS Independent
32
16
  Classifier: Programming Language :: Python
33
17
  Classifier: Programming Language :: Python :: 3 :: Only
34
- Classifier: Programming Language :: Python :: 3.10
35
18
  Classifier: Programming Language :: Python :: 3.11
36
19
  Classifier: Programming Language :: Python :: 3.12
37
20
  Classifier: Programming Language :: Python :: 3.13
38
21
  Classifier: Programming Language :: Python :: 3.14
39
22
  Classifier: Programming Language :: Python :: 3.15
40
- Requires-Python: >=3.10
41
- Requires-Dist: pre-commit>=4.3
42
- Requires-Dist: uv>=0.9.1
23
+ Classifier: Topic :: Software Development :: Version Control :: Git
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: pre-commit>=4.6.2
26
+ Requires-Dist: uv>=0.12.22
43
27
  Description-Content-Type: text/markdown
44
28
 
45
29
  # pre-commit-uv
@@ -53,6 +37,10 @@ Description-Content-Type: text/markdown
53
37
 
54
38
  Use `uv` to create virtual environments and install packages for `pre-commit`.
55
39
 
40
+ [Changelog](https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md)
41
+
42
+ [Contributing](https://github.com/tox-dev/pre-commit-uv/blob/main/CONTRIBUTING.md)
43
+
56
44
  ## Installation
57
45
 
58
46
  With pipx:
@@ -70,10 +58,8 @@ uv tool install pre-commit --with pre-commit-uv --force-reinstall
70
58
 
71
59
  ## Why?
72
60
 
73
- Compared to upstream `pre-commit` will speed up the initial seed operation. In general, upstream recommends caching the
74
- `pre-commit` cache, however, that is not always possible and is still helpful to have a more performant initial cache
75
- creation., Here's an example of what you could expect demonstrated on this project's own pre-commit setup (with a hot
76
- `uv` cache):
61
+ `pre-commit-uv` uses uv to create and seed hook environments. Caching the pre-commit directory avoids this work on later
62
+ runs, but the first install still needs it. This benchmark used this project's hooks with a warm uv cache:
77
63
 
78
64
  ```shell
79
65
  ❯ hyperfine 'pre-commit install-hooks' 'pre-commit-uv install-hooks'
@@ -91,10 +77,9 @@ Summary
91
77
 
92
78
  ## Configuration
93
79
 
94
- Once installed will use `uv` out of box, however the `DISABLE_PRE_COMMIT_UV_PATCH` environment variable if is set it
95
- will work as an escape hatch to disable the new behavior.
80
+ Once installed, `pre-commit-uv` uses uv by default. Set `DISABLE_PRE_COMMIT_UV_PATCH` to use pre-commit's normal
81
+ installation path instead.
96
82
 
97
- To avoid interpreter startup overhead of the patching, we only perform this when we detect you calling `pre-commit`.
98
- Should this logic fail you can force the patching by setting the `FORCE_PRE_COMMIT_UV_PATCH` variable. Should you
99
- experience this please raise an issue with the content of the `sys.argv`. Note that `DISABLE_PRE_COMMIT_UV_PATCH` will
100
- overwrite this flag should both be set.
83
+ The patch loads when the process appears to be running pre-commit. If detection misses a call, set
84
+ `FORCE_PRE_COMMIT_UV_PATCH` and report the value of `sys.argv` in an issue. `DISABLE_PRE_COMMIT_UV_PATCH` takes
85
+ precedence when both variables are set.
@@ -9,6 +9,10 @@
9
9
 
10
10
  Use `uv` to create virtual environments and install packages for `pre-commit`.
11
11
 
12
+ [Changelog](CHANGELOG.md)
13
+
14
+ [Contributing](CONTRIBUTING.md)
15
+
12
16
  ## Installation
13
17
 
14
18
  With pipx:
@@ -26,10 +30,8 @@ uv tool install pre-commit --with pre-commit-uv --force-reinstall
26
30
 
27
31
  ## Why?
28
32
 
29
- Compared to upstream `pre-commit` will speed up the initial seed operation. In general, upstream recommends caching the
30
- `pre-commit` cache, however, that is not always possible and is still helpful to have a more performant initial cache
31
- creation., Here's an example of what you could expect demonstrated on this project's own pre-commit setup (with a hot
32
- `uv` cache):
33
+ `pre-commit-uv` uses uv to create and seed hook environments. Caching the pre-commit directory avoids this work on later
34
+ runs, but the first install still needs it. This benchmark used this project's hooks with a warm uv cache:
33
35
 
34
36
  ```shell
35
37
  ❯ hyperfine 'pre-commit install-hooks' 'pre-commit-uv install-hooks'
@@ -47,10 +49,9 @@ Summary
47
49
 
48
50
  ## Configuration
49
51
 
50
- Once installed will use `uv` out of box, however the `DISABLE_PRE_COMMIT_UV_PATCH` environment variable if is set it
51
- will work as an escape hatch to disable the new behavior.
52
+ Once installed, `pre-commit-uv` uses uv by default. Set `DISABLE_PRE_COMMIT_UV_PATCH` to use pre-commit's normal
53
+ installation path instead.
52
54
 
53
- To avoid interpreter startup overhead of the patching, we only perform this when we detect you calling `pre-commit`.
54
- Should this logic fail you can force the patching by setting the `FORCE_PRE_COMMIT_UV_PATCH` variable. Should you
55
- experience this please raise an issue with the content of the `sys.argv`. Note that `DISABLE_PRE_COMMIT_UV_PATCH` will
56
- overwrite this flag should both be set.
55
+ The patch loads when the process appears to be running pre-commit. If detection misses a call, set
56
+ `FORCE_PRE_COMMIT_UV_PATCH` and report the value of `sys.argv` in an issue. `DISABLE_PRE_COMMIT_UV_PATCH` takes
57
+ precedence when both variables are set.
@@ -0,0 +1,221 @@
1
+ [build-system]
2
+ build-backend = "hatchling.build"
3
+ requires = [
4
+ "hatch-fancy-pypi-readme>=25.1",
5
+ "hatch-vcs>=0.5",
6
+ "hatchling>=1.32.4",
7
+ ]
8
+
9
+ [project]
10
+ name = "pre-commit-uv"
11
+ import-names = [ "pre_commit_uv" ]
12
+ description = "Run pre-commit with uv"
13
+ keywords = [
14
+ "hooks",
15
+ "pre-commit",
16
+ "uv",
17
+ ]
18
+ license = "MIT"
19
+ license-files = [ "LICENSE.txt" ]
20
+ authors = [
21
+ { name = "Bernat Gabor", email = "gaborjbernat@gmail.com" },
22
+ ]
23
+ requires-python = ">=3.11"
24
+ classifiers = [
25
+ "Intended Audience :: Developers",
26
+ "Operating System :: OS Independent",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3 :: Only",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "Programming Language :: Python :: 3.13",
32
+ "Programming Language :: Python :: 3.14",
33
+ "Programming Language :: Python :: 3.15",
34
+ "Topic :: Software Development :: Version Control :: Git",
35
+ ]
36
+ dynamic = [
37
+ "readme",
38
+ "version",
39
+ ]
40
+ dependencies = [
41
+ "pre-commit>=4.6.2",
42
+ "uv>=0.12.22",
43
+ ]
44
+ urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues"
45
+ urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv"
46
+ urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md"
47
+ urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/"
48
+
49
+ [dependency-groups]
50
+ dev = [
51
+ { include-group = "lint" },
52
+ { include-group = "pkg-meta" },
53
+ { include-group = "test" },
54
+ { include-group = "type" },
55
+ ]
56
+ test = [
57
+ "covdefaults>=2.3",
58
+ "pytest>=9.1.1",
59
+ "pytest-cov>=7.1",
60
+ "pytest-mock>=3.16",
61
+ ]
62
+ type = [
63
+ "ty>=0.0.84",
64
+ { include-group = "test" },
65
+ ]
66
+ build = [
67
+ "cython>=3",
68
+ "hatch-fancy-pypi-readme>=25.1",
69
+ "hatch-vcs>=0.5",
70
+ "hatchling>=1.32.4",
71
+ "setuptools>=80",
72
+ ]
73
+ lint = [
74
+ "pre-commit>=4.6.2",
75
+ ]
76
+ pkg-meta = [
77
+ "check-wheel-contents>=0.6.3",
78
+ "twine>=7",
79
+ "uv>=0.12.22",
80
+ ]
81
+ release-news = [
82
+ "release-creator>=4.1",
83
+ "towncrier>=26.9",
84
+ ]
85
+ release-notes = [
86
+ "release-creator>=4.1",
87
+ ]
88
+ release-prepare = [
89
+ "prek>=0.5",
90
+ "release-creator>=4.1",
91
+ "towncrier>=26.9",
92
+ ]
93
+
94
+ [tool.hatch]
95
+ version.source = "vcs"
96
+ metadata.hooks.fancy-pypi-readme.content-type = "text/markdown"
97
+ metadata.hooks.fancy-pypi-readme.fragments = [ { path = "README.md" } ]
98
+ metadata.hooks.fancy-pypi-readme.substitutions = [
99
+ { pattern = '''(?x)
100
+ (?<!!)\[(?P<label>[^\]]+)\]\( # Link text, excluding images
101
+ (?P<path>(?:CHANGELOG|CONTRIBUTING)\.md) # Repository files linked from the README
102
+ \)
103
+ ''', replacement = '[\g<label>](https://github.com/tox-dev/pre-commit-uv/blob/main/\g<path>)' },
104
+ ]
105
+ build.dev-mode-dirs = [
106
+ "src",
107
+ ]
108
+ build.targets.sdist.include = [
109
+ "/CHANGELOG.md",
110
+ "/CONTRIBUTING.md",
111
+ "/README.md",
112
+ "/src",
113
+ "/tests",
114
+ "/tox.toml",
115
+ ]
116
+ build.targets.wheel.only-include = [ "src" ]
117
+ build.targets.wheel.sources = [ "src" ]
118
+
119
+ [tool.uv]
120
+ dependency-groups.release-news = { requires-python = ">=3.15" }
121
+ dependency-groups.release-notes = { requires-python = ">=3.15" }
122
+ dependency-groups.release-prepare = { requires-python = ">=3.15" }
123
+
124
+ [tool.ruff]
125
+ line-length = 120
126
+ format.preview = true
127
+ format.docstring-code-line-length = 100
128
+ format.docstring-code-format = true
129
+ lint.select = [
130
+ "ALL",
131
+ ]
132
+ lint.ignore = [
133
+ "any-type", # allow Any as type annotation
134
+ "CPY", # No copyright statements
135
+ "docstring-missing-exception", # not working with Sphinx
136
+ "hardcoded-bind-all-interfaces", # Possible binding to all interfaces
137
+ "incorrect-blank-line-before-class", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
138
+ "missing-trailing-comma", # Conflict with formatter
139
+ "multi-line-summary-first-line", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
140
+ "non-empty-init-module", # `__init__` module should only contain docstrings and re-exports
141
+ "single-line-implicit-string-concatenation", # Conflict with formatter
142
+ ]
143
+ lint.per-file-ignores."tests/**/*.py" = [
144
+ "assert", # asserts allowed in tests...
145
+ "D", # don"t care about documentation in tests
146
+ "FBT", # don"t care about booleans as positional arguments in tests
147
+ "implicit-namespace-package", # no implicit namespace
148
+ "import-private-name", # private import
149
+ "magic-value-comparison", # Magic value used in comparison, consider replacing with a constant variable
150
+ "S", # `subprocess` call: check for execution of untrusted input
151
+ "too-many-arguments", # any number of arguments in tests
152
+ "too-many-positional-arguments", # any number of arguments in tests
153
+ ]
154
+ lint.isort = { known-first-party = [
155
+ "pre_commit_uv",
156
+ ], required-imports = [
157
+ "from __future__ import annotations",
158
+ ] }
159
+ lint.preview = true
160
+
161
+ [tool.codespell]
162
+ builtin = "clear,usage,en-GB_to_en-US"
163
+ count = true
164
+
165
+ [tool.pyproject-fmt]
166
+ max_supported_python = "3.15"
167
+
168
+ [tool.ty]
169
+ environment.python-version = "3.15"
170
+
171
+ [tool.pytest]
172
+ ini_options.testpaths = [
173
+ "tests",
174
+ ]
175
+
176
+ [tool.coverage]
177
+ run.parallel = true
178
+ run.plugins = [
179
+ "covdefaults",
180
+ ]
181
+ paths.source = [
182
+ "src",
183
+ ".tox/*/.venv/lib/*/site-packages",
184
+ ".tox\\*\\.venv\\Lib\\site-packages",
185
+ ".tox/*/lib/*/site-packages",
186
+ ".tox\\*\\Lib\\site-packages",
187
+ "**/src",
188
+ "**\\src",
189
+ ]
190
+ report.fail_under = 63
191
+ html.show_contexts = true
192
+ html.skip_covered = false
193
+
194
+ [tool.towncrier]
195
+ name = "pre-commit-uv"
196
+ directory = "changelog.d"
197
+ filename = "CHANGELOG.md"
198
+ template = "release_creator.fragments:template.jinja2"
199
+ title_format = false
200
+ type = [
201
+ { directory = "feature", name = "Added", showcontent = true },
202
+ { directory = "change", name = "Changes", showcontent = true },
203
+ { directory = "bugfix", name = "Fixed", showcontent = true },
204
+ { directory = "doc", name = "Documentation", showcontent = true },
205
+ { directory = "breaking", name = "Breaking changes", showcontent = true },
206
+ { directory = "security", name = "Security", showcontent = true },
207
+ { directory = "performance", name = "Performance", showcontent = true },
208
+ { directory = "deprecation", name = "Deprecated", showcontent = true },
209
+ { directory = "removal", name = "Removed", showcontent = true },
210
+ { directory = "packaging", name = "Packaging", showcontent = true },
211
+ ]
212
+
213
+ [tool.nab]
214
+ mode = "universal"
215
+ base-group = "project-runtime"
216
+ uploaded-prior-to = "P7D"
217
+ decision-order = "stable"
218
+ matrix.python = ">=3.15,<3.16"
219
+ matrix.platforms = [ "linux_x86_64" ]
220
+ # temporary, delete after 2026-11-02
221
+ packages.release-creator.uploaded-prior-to = 2026-10-26T18:24:46Z
@@ -0,0 +1,70 @@
1
+ requires = [ "tox>=4.64.7", "tox-uv>=1.36.1" ]
2
+ env_list = [ "3.15", "3.14", "3.13", "3.12", "3.11", "3.15t", "fix", "pkg_meta", "type" ]
3
+ skip_missing_interpreters = true
4
+
5
+ [env_run_base]
6
+ description = "run the unit tests with pytest under {env_name}"
7
+ default_base_python = [ "3.15" ]
8
+ package = "wheel"
9
+ wheel_build_env = ".pkg"
10
+ dependency_groups = [ "test" ]
11
+ pass_env = [ "PYTEST_*" ]
12
+ set_env.COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{work_dir}{/}.coverage.{env_name}" }
13
+ commands = [
14
+ [
15
+ "python",
16
+ "-m",
17
+ "pytest",
18
+ { replace = "posargs", default = [
19
+ "--cov",
20
+ "{env_site_packages_dir}{/}pre_commit_uv",
21
+ "--cov",
22
+ "{tox_root}{/}tests",
23
+ "--cov-config=pyproject.toml",
24
+ "--no-cov-on-fail",
25
+ "--cov-report",
26
+ "term-missing:skip-covered",
27
+ "--cov-context=test",
28
+ "--cov-report",
29
+ "html:{env_tmp_dir}{/}htmlcov",
30
+ "--cov-report",
31
+ "xml:{work_dir}{/}coverage.{env_name}.xml",
32
+ "--junitxml",
33
+ "{work_dir}{/}junit.{env_name}.xml",
34
+ "tests",
35
+ ], extend = true },
36
+ ],
37
+ ]
38
+
39
+ [env_pkg_base]
40
+ default_base_python = [ "3.15" ]
41
+
42
+ [env.fix]
43
+ description = "format the code base to adhere to our styles, and complain about what we cannot do automatically"
44
+ dependency_groups = [ "lint" ]
45
+ commands = [ [ "pre-commit", "run", "--all-files", "--show-diff-on-failure" ] ]
46
+
47
+ [env.pkg_meta]
48
+ description = "check that the long description is valid"
49
+ skip_install = true
50
+ dependency_groups = [ "pkg-meta" ]
51
+ commands = [
52
+ [ "uv", "build", "--sdist", "--wheel", "--out-dir", "{env_tmp_dir}", "." ],
53
+ [ "twine", "check", "{env_tmp_dir}{/}*" ],
54
+ [ "check-wheel-contents", "--no-config", "{env_tmp_dir}" ],
55
+ ]
56
+
57
+ [env.type]
58
+ description = "run type check on code base"
59
+ dependency_groups = [ "type" ]
60
+ commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ]
61
+
62
+ [env.dev]
63
+ description = "generate a DEV environment"
64
+ package = "editable"
65
+ dependency_groups = [ "dev" ]
66
+ commands = [
67
+ [ "uv", "pip", "tree" ],
68
+ [ "python", "-c", "import sys; print(sys.executable)" ],
69
+ [ "python", "task/dev_pth.py", "{env_site_packages_dir}" ],
70
+ ]
@@ -1,152 +0,0 @@
1
- [build-system]
2
- build-backend = "hatchling.build"
3
- requires = [
4
- "hatch-vcs>=0.5",
5
- "hatchling>=1.28",
6
- ]
7
-
8
- [project]
9
- name = "pre-commit-uv"
10
- description = "Run pre-commit with uv"
11
- readme = "README.md"
12
- keywords = [
13
- "format",
14
- "pyproject",
15
- ]
16
- license.file = "LICENSE.txt"
17
- authors = [
18
- { name = "Bernat Gabor", email = "gaborjbernat@gmail.com" },
19
- ]
20
- requires-python = ">=3.10"
21
- classifiers = [
22
- "License :: OSI Approved :: MIT License",
23
- "Operating System :: OS Independent",
24
- "Programming Language :: Python",
25
- "Programming Language :: Python :: 3 :: Only",
26
- "Programming Language :: Python :: 3.10",
27
- "Programming Language :: Python :: 3.11",
28
- "Programming Language :: Python :: 3.12",
29
- "Programming Language :: Python :: 3.13",
30
- "Programming Language :: Python :: 3.14",
31
- "Programming Language :: Python :: 3.15",
32
- ]
33
- dynamic = [
34
- "version",
35
- ]
36
- dependencies = [
37
- "pre-commit>=4.3",
38
- "uv>=0.9.1",
39
- ]
40
- urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues"
41
- urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv"
42
- urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/releases"
43
- urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/"
44
-
45
- [dependency-groups]
46
- dev = [
47
- { include-group = "lint" },
48
- { include-group = "pkg-meta" },
49
- { include-group = "test" },
50
- { include-group = "type" },
51
- ]
52
- test = [
53
- "covdefaults>=2.3",
54
- "pytest>=8.4.2",
55
- "pytest-cov>=7",
56
- "pytest-mock>=3.15.1",
57
- ]
58
- type = [
59
- "ty>=0.0.17",
60
- { include-group = "test" },
61
- ]
62
- lint = [
63
- "pre-commit-uv>=4.2",
64
- ]
65
- pkg-meta = [
66
- "check-wheel-contents>=0.6.3",
67
- "twine>=6.2",
68
- "uv>=0.10.2",
69
- ]
70
-
71
- [tool.hatch]
72
- version.source = "vcs"
73
- build.dev-mode-dirs = [
74
- "src",
75
- ]
76
- build.targets.sdist.include = [
77
- "/src",
78
- "/tests",
79
- "tox.ini",
80
- ]
81
- build.targets.wheel.only-include = [ "src" ]
82
- build.targets.wheel.sources = [ "src" ]
83
-
84
- [tool.ruff]
85
- line-length = 120
86
- format.preview = true
87
- format.docstring-code-line-length = 100
88
- format.docstring-code-format = true
89
- lint.select = [
90
- "ALL",
91
- ]
92
- lint.ignore = [
93
- "ANN401", # allow Any as type annotation
94
- "COM812", # Conflict with formatter
95
- "CPY", # No copyright statements
96
- "D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
97
- "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
98
- "DOC501", # not working with Sphinx
99
- "ISC001", # Conflict with formatter
100
- "RUF067", # `__init__` module should only contain docstrings and re-exports
101
- "S104", # Possible binding to all interfaces
102
- ]
103
- lint.per-file-ignores."tests/**/*.py" = [
104
- "D", # don"t care about documentation in tests
105
- "FBT", # don"t care about booleans as positional arguments in tests
106
- "INP001", # no implicit namespace
107
- "PLC2701", # private import
108
- "PLR0913", # any number of arguments in tests
109
- "PLR0917", # any number of arguments in tests
110
- "PLR2004", # Magic value used in comparison, consider replacing with a constant variable
111
- "S", # `subprocess` call: check for execution of untrusted input
112
- "S101", # asserts allowed in tests...
113
- ]
114
- lint.isort = { known-first-party = [
115
- "pre_commit_uv",
116
- ], required-imports = [
117
- "from __future__ import annotations",
118
- ] }
119
- lint.preview = true
120
-
121
- [tool.codespell]
122
- builtin = "clear,usage,en-GB_to_en-US"
123
- count = true
124
-
125
- [tool.pyproject-fmt]
126
- max_supported_python = "3.15"
127
-
128
- [tool.ty]
129
- environment.python-version = "3.14"
130
-
131
- [tool.pytest]
132
- ini_options.testpaths = [
133
- "tests",
134
- ]
135
-
136
- [tool.coverage]
137
- run.parallel = true
138
- run.plugins = [
139
- "covdefaults",
140
- ]
141
- paths.source = [
142
- "src",
143
- ".tox/*/.venv/lib/*/site-packages",
144
- ".tox\\*\\.venv\\Lib\\site-packages",
145
- ".tox/*/lib/*/site-packages",
146
- ".tox\\*\\Lib\\site-packages",
147
- "**/src",
148
- "**\\src",
149
- ]
150
- report.fail_under = 63
151
- html.show_contexts = true
152
- html.skip_covered = false
File without changes