pre-commit-uv 4.4.0__tar.gz → 4.4.2__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,189 @@
1
+ # Changelog
2
+
3
+ <!-- towncrier release notes start -->
4
+
5
+ <a name="release-4-4-2"></a>
6
+
7
+ ## 4.4.2 (2026-11-04)
8
+
9
+ <a name="release-4-4-1"></a>
10
+
11
+ ## 4.4.1 (2026-10-27)
12
+
13
+ <a name="release-4-4-1-fixed"></a>
14
+
15
+ ### Fixed
16
+
17
+ - Fix repository links in the PyPI project description ([#190](https://github.com/tox-dev/pre-commit-uv/pull/190)) by
18
+ [@gaborbernat](https://github.com/gaborbernat).
19
+
20
+ <a name="release-4-4-0"></a>
21
+
22
+ ## 4.4.0 (2026-10-10)
23
+
24
+ <a name="release-4-4-0-added"></a>
25
+
26
+ ### Added
27
+
28
+ - Require Python 3.11 or newer ([#183](https://github.com/tox-dev/pre-commit-uv/pull/183)) by
29
+ [@gaborbernat](https://github.com/gaborbernat).
30
+ - Use Python 3.15 by default ([#183](https://github.com/tox-dev/pre-commit-uv/pull/183)) by
31
+ [@gaborbernat](https://github.com/gaborbernat).
32
+
33
+ <a name="release-4-3-0"></a>
34
+
35
+ ## 4.3.0 (2026-07-20)
36
+
37
+ <a name="release-4-3-0-added"></a>
38
+
39
+ ### Added
40
+
41
+ - Support Python 3.15 ([#164](https://github.com/tox-dev/pre-commit-uv/pull/164)) by
42
+ [@gaborbernat](https://github.com/gaborbernat).
43
+
44
+ <a name="release-4-2-2"></a>
45
+
46
+ ## 4.2.2 (2026-06-19)
47
+
48
+ <a name="release-4-2-2-fixed"></a>
49
+
50
+ ### Fixed
51
+
52
+ - Handle truncated `version_info` values in uv's `pyvenv.cfg`
53
+ ([#153](https://github.com/tox-dev/pre-commit-uv/pull/153)) by [@gaborbernat](https://github.com/gaborbernat).
54
+
55
+ <a name="release-4-2-1"></a>
56
+
57
+ ## 4.2.1 (2026-02-18)
58
+
59
+ <a name="release-4-2-1-fixed"></a>
60
+
61
+ ### Fixed
62
+
63
+ - Seed pip into hook environments ([#114](https://github.com/tox-dev/pre-commit-uv/pull/114)) by
64
+ [@gaborbernat](https://github.com/gaborbernat).
65
+ - Detect calls through `python -m pre_commit` ([#115](https://github.com/tox-dev/pre-commit-uv/pull/115)) by
66
+ [@gaborbernat](https://github.com/gaborbernat).
67
+
68
+ <a name="release-4-2-0"></a>
69
+
70
+ ## 4.2.0 (2025-10-09)
71
+
72
+ <a name="release-4-2-0-added"></a>
73
+
74
+ ### Added
75
+
76
+ - Support Python 3.14 ([#86](https://github.com/tox-dev/pre-commit-uv/pull/86)) by
77
+ [@ssbarnea](https://github.com/ssbarnea).
78
+ - End Python 3.9 support ([#91](https://github.com/tox-dev/pre-commit-uv/pull/91)) by
79
+ [@gaborbernat](https://github.com/gaborbernat).
80
+
81
+ <a name="release-4-1-5"></a>
82
+
83
+ ## 4.1.5 (2025-08-27)
84
+
85
+ <a name="release-4-1-5-changes"></a>
86
+
87
+ ### Changes
88
+
89
+ - Use the current project's uv configuration ([#79](https://github.com/tox-dev/pre-commit-uv/pull/79)) by
90
+ [@aaravind100](https://github.com/aaravind100).
91
+
92
+ <a name="release-4-1-4"></a>
93
+
94
+ ## 4.1.4 (2024-10-29)
95
+
96
+ <a name="release-4-1-4-fixed"></a>
97
+
98
+ ### Fixed
99
+
100
+ - Respect `UV_PYTHON` and fall back to `sys.executable` ([#29](https://github.com/tox-dev/pre-commit-uv/pull/29)) by
101
+ [@gaborbernat](https://github.com/gaborbernat).
102
+
103
+ <a name="release-4-1-3"></a>
104
+
105
+ ## 4.1.3 (2024-09-23)
106
+
107
+ <a name="release-4-1-3-fixed"></a>
108
+
109
+ ### Fixed
110
+
111
+ - Patch pre-commit when invoked by `git commit` ([#18](https://github.com/tox-dev/pre-commit-uv/pull/18)) by
112
+ [@florianfischer91](https://github.com/florianfischer91).
113
+
114
+ <a name="release-4-1-2"></a>
115
+
116
+ ## 4.1.2 (2024-09-18)
117
+
118
+ <a name="release-4-1-1"></a>
119
+
120
+ ## 4.1.1 (2024-09-08)
121
+
122
+ <a name="release-4-1-1-added"></a>
123
+
124
+ ### Added
125
+
126
+ - Support Python 3.13 ([#12](https://github.com/tox-dev/pre-commit-uv/pull/12)) by
127
+ [@gaborbernat](https://github.com/gaborbernat).
128
+
129
+ <a name="release-4-1-0"></a>
130
+
131
+ ## 4.1.0 (2024-08-12)
132
+
133
+ <a name="release-4-1-0-changes"></a>
134
+
135
+ ### Changes
136
+
137
+ - Show pre-commit-uv and uv versions in `--version` output ([#7](https://github.com/tox-dev/pre-commit-uv/pull/7)) by
138
+ [@gaborbernat](https://github.com/gaborbernat).
139
+
140
+ <a name="release-4-0-3"></a>
141
+
142
+ ## 4.0.3 (2024-08-08)
143
+
144
+ <a name="release-4-0-3-fixed"></a>
145
+
146
+ ### Fixed
147
+
148
+ - Pass the caller's Python to uv ([#5](https://github.com/tox-dev/pre-commit-uv/pull/5)) by
149
+ [@gaborbernat](https://github.com/gaborbernat).
150
+
151
+ <a name="release-4-0-2"></a>
152
+
153
+ ## 4.0.2 (2024-08-07)
154
+
155
+ <a name="release-4-0-2-documentation"></a>
156
+
157
+ ### Documentation
158
+
159
+ - Add installation instructions ([commit](https://github.com/tox-dev/pre-commit-uv/commit/fdb8619)) by
160
+ [@gaborbernat](https://github.com/gaborbernat).
161
+
162
+ <a name="release-4-0-1"></a>
163
+
164
+ ## 4.0.1 (2024-08-07)
165
+
166
+ <a name="release-4-0-1-performance"></a>
167
+
168
+ ### Performance
169
+
170
+ - Avoid patching import overhead ([#2](https://github.com/tox-dev/pre-commit-uv/pull/2)) by
171
+ [@gaborbernat](https://github.com/gaborbernat).
172
+
173
+ <a name="release-4-0-1-documentation"></a>
174
+
175
+ ### Documentation
176
+
177
+ - Extend the README ([#2](https://github.com/tox-dev/pre-commit-uv/pull/2)) by
178
+ [@gaborbernat](https://github.com/gaborbernat).
179
+
180
+ <a name="release-4-0-0"></a>
181
+
182
+ ## 4.0.0 (2024-08-05)
183
+
184
+ <a name="release-4-0-0-added"></a>
185
+
186
+ ### Added
187
+
188
+ - Publish the first pre-commit-uv release ([#1](https://github.com/tox-dev/pre-commit-uv/pull/1)) by
189
+ [@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,33 +1,17 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pre-commit-uv
3
- Version: 4.4.0
3
+ Version: 4.4.2
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
@@ -36,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
36
20
  Classifier: Programming Language :: Python :: 3.13
37
21
  Classifier: Programming Language :: Python :: 3.14
38
22
  Classifier: Programming Language :: Python :: 3.15
23
+ Classifier: Topic :: Software Development :: Version Control :: Git
39
24
  Requires-Python: >=3.11
40
25
  Requires-Dist: pre-commit>=4.6.2
41
26
  Requires-Dist: uv>=0.12.22
@@ -49,9 +34,15 @@ Description-Content-Type: text/markdown
49
34
  [![Downloads](https://static.pepy.tech/badge/pre-commit-uv/month)](https://pepy.tech/project/pre-commit-uv)
50
35
  [![PyPI - License](https://img.shields.io/pypi/l/pre-commit-uv?style=flat-square)](https://opensource.org/licenses/MIT)
51
36
  [![check](https://github.com/tox-dev/pre-commit-uv/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/pre-commit-uv/actions/workflows/check.yaml)
37
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/tox-dev/pre-commit-uv/badge)](https://scorecard.dev/viewer/?uri=github.com/tox-dev/pre-commit-uv)
38
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/16254/badge)](https://www.bestpractices.dev/projects/16254)
52
39
 
53
40
  Use `uv` to create virtual environments and install packages for `pre-commit`.
54
41
 
42
+ [Changelog](https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md)
43
+
44
+ [Contributing](https://github.com/tox-dev/pre-commit-uv/blob/main/CONTRIBUTING.md)
45
+
55
46
  ## Installation
56
47
 
57
48
  With pipx:
@@ -69,10 +60,8 @@ uv tool install pre-commit --with pre-commit-uv --force-reinstall
69
60
 
70
61
  ## Why?
71
62
 
72
- Compared to upstream `pre-commit` will speed up the initial seed operation. In general, upstream recommends caching the
73
- `pre-commit` cache, however, that is not always possible and is still helpful to have a more performant initial cache
74
- creation., Here's an example of what you could expect demonstrated on this project's own pre-commit setup (with a hot
75
- `uv` cache):
63
+ `pre-commit-uv` uses uv to create and seed hook environments. Caching the pre-commit directory avoids this work on later
64
+ runs, but the first install still needs it. This benchmark used this project's hooks with a warm uv cache:
76
65
 
77
66
  ```shell
78
67
  ❯ hyperfine 'pre-commit install-hooks' 'pre-commit-uv install-hooks'
@@ -90,10 +79,9 @@ Summary
90
79
 
91
80
  ## Configuration
92
81
 
93
- Once installed will use `uv` out of box, however the `DISABLE_PRE_COMMIT_UV_PATCH` environment variable if is set it
94
- will work as an escape hatch to disable the new behavior.
82
+ Once installed, `pre-commit-uv` uses uv by default. Set `DISABLE_PRE_COMMIT_UV_PATCH` to use pre-commit's normal
83
+ installation path instead.
95
84
 
96
- To avoid interpreter startup overhead of the patching, we only perform this when we detect you calling `pre-commit`.
97
- Should this logic fail you can force the patching by setting the `FORCE_PRE_COMMIT_UV_PATCH` variable. Should you
98
- experience this please raise an issue with the content of the `sys.argv`. Note that `DISABLE_PRE_COMMIT_UV_PATCH` will
99
- overwrite this flag should both be set.
85
+ The patch loads when the process appears to be running pre-commit. If detection misses a call, set
86
+ `FORCE_PRE_COMMIT_UV_PATCH` and report the value of `sys.argv` in an issue. `DISABLE_PRE_COMMIT_UV_PATCH` takes
87
+ precedence when both variables are set.
@@ -6,9 +6,15 @@
6
6
  [![Downloads](https://static.pepy.tech/badge/pre-commit-uv/month)](https://pepy.tech/project/pre-commit-uv)
7
7
  [![PyPI - License](https://img.shields.io/pypi/l/pre-commit-uv?style=flat-square)](https://opensource.org/licenses/MIT)
8
8
  [![check](https://github.com/tox-dev/pre-commit-uv/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/pre-commit-uv/actions/workflows/check.yaml)
9
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/tox-dev/pre-commit-uv/badge)](https://scorecard.dev/viewer/?uri=github.com/tox-dev/pre-commit-uv)
10
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/16254/badge)](https://www.bestpractices.dev/projects/16254)
9
11
 
10
12
  Use `uv` to create virtual environments and install packages for `pre-commit`.
11
13
 
14
+ [Changelog](CHANGELOG.md)
15
+
16
+ [Contributing](CONTRIBUTING.md)
17
+
12
18
  ## Installation
13
19
 
14
20
  With pipx:
@@ -26,10 +32,8 @@ uv tool install pre-commit --with pre-commit-uv --force-reinstall
26
32
 
27
33
  ## Why?
28
34
 
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):
35
+ `pre-commit-uv` uses uv to create and seed hook environments. Caching the pre-commit directory avoids this work on later
36
+ runs, but the first install still needs it. This benchmark used this project's hooks with a warm uv cache:
33
37
 
34
38
  ```shell
35
39
  ❯ hyperfine 'pre-commit install-hooks' 'pre-commit-uv install-hooks'
@@ -47,10 +51,9 @@ Summary
47
51
 
48
52
  ## Configuration
49
53
 
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.
54
+ Once installed, `pre-commit-uv` uses uv by default. Set `DISABLE_PRE_COMMIT_UV_PATCH` to use pre-commit's normal
55
+ installation path instead.
52
56
 
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.
57
+ The patch loads when the process appears to be running pre-commit. If detection misses a call, set
58
+ `FORCE_PRE_COMMIT_UV_PATCH` and report the value of `sys.argv` in an issue. `DISABLE_PRE_COMMIT_UV_PATCH` takes
59
+ precedence when both variables are set.
@@ -1,25 +1,28 @@
1
1
  [build-system]
2
2
  build-backend = "hatchling.build"
3
3
  requires = [
4
+ "hatch-fancy-pypi-readme>=25.1",
4
5
  "hatch-vcs>=0.5",
5
6
  "hatchling>=1.32.4",
6
7
  ]
7
8
 
8
9
  [project]
9
10
  name = "pre-commit-uv"
11
+ import-names = [ "pre_commit_uv" ]
10
12
  description = "Run pre-commit with uv"
11
- readme = "README.md"
12
13
  keywords = [
13
- "format",
14
- "pyproject",
14
+ "hooks",
15
+ "pre-commit",
16
+ "uv",
15
17
  ]
16
- license.file = "LICENSE.txt"
18
+ license = "MIT"
19
+ license-files = [ "LICENSE.txt" ]
17
20
  authors = [
18
21
  { name = "Bernat Gabor", email = "gaborjbernat@gmail.com" },
19
22
  ]
20
23
  requires-python = ">=3.11"
21
24
  classifiers = [
22
- "License :: OSI Approved :: MIT License",
25
+ "Intended Audience :: Developers",
23
26
  "Operating System :: OS Independent",
24
27
  "Programming Language :: Python",
25
28
  "Programming Language :: Python :: 3 :: Only",
@@ -28,8 +31,10 @@ classifiers = [
28
31
  "Programming Language :: Python :: 3.13",
29
32
  "Programming Language :: Python :: 3.14",
30
33
  "Programming Language :: Python :: 3.15",
34
+ "Topic :: Software Development :: Version Control :: Git",
31
35
  ]
32
36
  dynamic = [
37
+ "readme",
33
38
  "version",
34
39
  ]
35
40
  dependencies = [
@@ -38,7 +43,7 @@ dependencies = [
38
43
  ]
39
44
  urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues"
40
45
  urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv"
41
- urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/releases"
46
+ urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md"
42
47
  urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/"
43
48
 
44
49
  [dependency-groups]
@@ -58,28 +63,64 @@ type = [
58
63
  "ty>=0.0.84",
59
64
  { include-group = "test" },
60
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
+ ]
61
73
  lint = [
62
- "pre-commit-uv>=4.2",
74
+ "pre-commit>=4.6.2",
63
75
  ]
64
76
  pkg-meta = [
65
77
  "check-wheel-contents>=0.6.3",
66
78
  "twine>=7",
67
79
  "uv>=0.12.22",
68
80
  ]
81
+ release-news = [
82
+ "release-creator>=4.4",
83
+ "towncrier>=26.9",
84
+ ]
85
+ release-notes = [
86
+ "release-creator>=4.4",
87
+ ]
88
+ release-prepare = [
89
+ "prek>=0.5",
90
+ "release-creator>=4.4",
91
+ "towncrier>=26.9",
92
+ ]
69
93
 
70
94
  [tool.hatch]
71
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
+ ]
72
105
  build.dev-mode-dirs = [
73
106
  "src",
74
107
  ]
75
108
  build.targets.sdist.include = [
109
+ "/CHANGELOG.md",
110
+ "/CONTRIBUTING.md",
111
+ "/README.md",
76
112
  "/src",
77
113
  "/tests",
78
- "tox.ini",
114
+ "/tox.toml",
79
115
  ]
80
116
  build.targets.wheel.only-include = [ "src" ]
81
117
  build.targets.wheel.sources = [ "src" ]
82
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
+
83
124
  [tool.ruff]
84
125
  line-length = 120
85
126
  format.preview = true
@@ -149,3 +190,33 @@ paths.source = [
149
190
  report.fail_under = 63
150
191
  html.show_contexts = true
151
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
+ # release-creator 4.4.0 needs a seven-day cutoff exception.
221
+ # expires 2026-11-09
222
+ packages.release-creator.uploaded-prior-to = 2026-11-02T21:45:00Z
@@ -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
+ ]
File without changes