unicode-segmentation-rs 0.2.0__tar.gz → 0.2.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.
Files changed (33) hide show
  1. unicode_segmentation_rs-0.2.2/.editorconfig +43 -0
  2. unicode_segmentation_rs-0.2.2/.github/release.yml +22 -0
  3. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/workflows/ci.yml +49 -44
  4. unicode_segmentation_rs-0.2.2/.github/workflows/dependency-review.yml +22 -0
  5. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/workflows/pre-commit.yml +19 -31
  6. unicode_segmentation_rs-0.2.2/.github/workflows/pull_requests.yaml +28 -0
  7. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.pre-commit-config.yaml +12 -10
  8. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/Cargo.lock +33 -72
  9. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/Cargo.toml +3 -3
  10. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/PKG-INFO +25 -29
  11. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/README.md +24 -28
  12. unicode_segmentation_rs-0.2.2/SECURITY.md +29 -0
  13. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/pyproject.toml +4 -4
  14. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/src/lib.rs +3 -0
  15. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/tests/test_gettext_wrap.py +66 -0
  16. unicode_segmentation_rs-0.2.2/tests/test_readme_examples.py +207 -0
  17. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/FUNDING.yml +0 -0
  18. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  19. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  20. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  21. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/PULL_REQUEST_TEMPLATE.md.license +0 -0
  23. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/renovate.json +0 -0
  24. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.github/renovate.json.license +0 -0
  25. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.gitignore +0 -0
  26. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.markdownlint.yml +0 -0
  27. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/.yamllint.yml +0 -0
  28. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/LICENSE +0 -0
  29. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/LICENSES/CC0-1.0.txt +0 -0
  30. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/LICENSES/MIT.txt +0 -0
  31. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/REUSE.toml +0 -0
  32. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/tests/test_unicode_segmentation.py +0 -0
  33. {unicode_segmentation_rs-0.2.0 → unicode_segmentation_rs-0.2.2}/unicode_segmentation_rs.pyi +0 -0
@@ -0,0 +1,43 @@
1
+ # Copyright © Michal Čihař <michal@weblate.org>
2
+ #
3
+ # SPDX-License-Identifier: CC0-1.0
4
+
5
+ # This file is maintained in https://github.com/WeblateOrg/meta/
6
+
7
+ root = true
8
+
9
+ [*]
10
+ indent_style = space
11
+ indent_size = 2
12
+ end_of_line = lf
13
+ charset = utf-8
14
+ trim_trailing_whitespace = true
15
+ insert_final_newline = true
16
+ spaces_around_operators = true
17
+
18
+ [*.bat]
19
+ end_of_line = crlf
20
+
21
+ [*.html]
22
+ indent_size = 2
23
+
24
+ [*.py]
25
+ indent_size = 4
26
+
27
+ [*.rst]
28
+ indent_size = 3
29
+
30
+ [*.js]
31
+ quote_type = double
32
+
33
+ [*.{markdown,md}]
34
+ trim_trailing_whitespace = false
35
+
36
+ [[shell]]
37
+ indent_style = space
38
+ indent_size = 4
39
+ space_redirects = true
40
+ simplify = true
41
+
42
+ [*.{kt,kts}]
43
+ indent_size = 4
@@ -0,0 +1,22 @@
1
+ # Copyright © Michal Čihař <michal@weblate.org>
2
+ #
3
+ # SPDX-License-Identifier: CC0-1.0
4
+
5
+ # This file is maintained in https://github.com/WeblateOrg/meta/
6
+
7
+ changelog:
8
+ categories:
9
+ - title: Changes and improvements
10
+ labels:
11
+ - '*'
12
+ exclude:
13
+ labels:
14
+ - dependencies
15
+ authors:
16
+ - weblate
17
+ - title: Dependency updates
18
+ labels:
19
+ - dependencies
20
+ - title: Translation updates
21
+ authors:
22
+ - weblate
@@ -38,23 +38,24 @@ jobs:
38
38
  python-version: '3.14'
39
39
  name: Tests, Python ${{ matrix.python-version }}, ${{ matrix.os }}
40
40
  steps:
41
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
41
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42
42
  with:
43
43
  persist-credentials: false
44
44
  - name: Set up Python ${{ matrix.python-version }}
45
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
45
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
46
46
  id: setup_python
47
47
  with:
48
48
  python-version: ${{ matrix.python-version }}
49
- - uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4 # zizmor: ignore[cache-poisoning]
49
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 # zizmor: ignore[cache-poisoning]
50
50
  # The cache is stored only on main branch and not used for publishing
51
51
  with:
52
52
  save-cache: ${{ github.ref == 'refs/heads/main' }}
53
53
  cache-suffix: ${{ steps.setup_python.outputs.python-version }}
54
- version: 0.9.13
54
+ version: 0.11.2
55
55
  activate-environment: 'true'
56
56
  - run: uv sync
57
- - run: pytest
57
+ - name: Run tests
58
+ run: pytest
58
59
 
59
60
 
60
61
  linux:
@@ -76,35 +77,35 @@ jobs:
76
77
  - runner: ubuntu-latest
77
78
  target: ppc64le
78
79
  steps:
79
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
80
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
80
81
  with:
81
82
  persist-credentials: false
82
- - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
83
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
83
84
  with:
84
85
  python-version: 3.x
85
86
  - name: Build wheels
86
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
87
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
87
88
  with:
88
89
  target: ${{ matrix.platform.target }}
89
90
  args: --release --out dist
90
91
  sccache: false
91
92
  manylinux: auto
92
93
  - name: Build free-threaded wheels
93
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
94
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
94
95
  with:
95
96
  target: ${{ matrix.platform.target }}
96
97
  args: --release --out dist -i python3.14t
97
98
  sccache: false
98
99
  manylinux: auto
99
100
  - name: Build free-threaded wheels
100
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
101
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
101
102
  with:
102
103
  target: ${{ matrix.platform.target }}
103
104
  args: --release --out dist -i python3.13t
104
105
  sccache: false
105
106
  manylinux: auto
106
107
  - name: Upload wheels
107
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
108
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
108
109
  with:
109
110
  name: wheels-linux-${{ matrix.platform.target }}
110
111
  path: dist
@@ -124,21 +125,21 @@ jobs:
124
125
  - runner: ubuntu-latest
125
126
  target: armv7
126
127
  steps:
127
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
128
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
128
129
  with:
129
130
  persist-credentials: false
130
- - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
131
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
131
132
  with:
132
133
  python-version: 3.x
133
134
  - name: Build wheels
134
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
135
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
135
136
  with:
136
137
  target: ${{ matrix.platform.target }}
137
138
  args: --release --out dist
138
139
  sccache: false
139
140
  manylinux: musllinux_1_2
140
141
  - name: Build free-threaded wheels
141
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
142
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
142
143
  with:
143
144
  target: ${{ matrix.platform.target }}
144
145
  args: --release --out dist -i python3.13t
@@ -146,7 +147,7 @@ jobs:
146
147
  sccache: false
147
148
  manylinux: musllinux_1_2
148
149
  - name: Build free-threaded wheels
149
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
150
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
150
151
  with:
151
152
  target: ${{ matrix.platform.target }}
152
153
  args: --release --out dist -i python3.14t
@@ -154,7 +155,7 @@ jobs:
154
155
  sccache: false
155
156
  manylinux: musllinux_1_2
156
157
  - name: Upload wheels
157
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
158
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
158
159
  with:
159
160
  name: wheels-musllinux-${{ matrix.platform.target }}
160
161
  path: dist
@@ -170,37 +171,37 @@ jobs:
170
171
  - runner: windows-latest
171
172
  target: x86
172
173
  steps:
173
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
174
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
174
175
  with:
175
176
  persist-credentials: false
176
- - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
177
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
177
178
  with:
178
179
  python-version: 3.x
179
180
  architecture: ${{ matrix.platform.target }}
180
181
  - name: Build wheels
181
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
182
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
182
183
  with:
183
184
  target: ${{ matrix.platform.target }}
184
185
  args: --release --out dist
185
186
  sccache: false
186
- - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
187
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
187
188
  with:
188
189
  python-version: 3.13t
189
190
  architecture: ${{ matrix.platform.target }}
190
191
  - name: Build free-threaded wheels
191
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
192
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
192
193
  with:
193
194
  target: ${{ matrix.platform.target }}
194
195
  args: --release --out dist -i python3.13t
195
196
  sccache: false
196
197
  - name: Build free-threaded wheels
197
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
198
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
198
199
  with:
199
200
  target: ${{ matrix.platform.target }}
200
201
  args: --release --out dist -i python3.14t
201
202
  sccache: false
202
203
  - name: Upload wheels
203
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
204
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
204
205
  with:
205
206
  name: wheels-windows-${{ matrix.platform.target }}
206
207
  path: dist
@@ -216,52 +217,52 @@ jobs:
216
217
  - runner: macos-15
217
218
  target: aarch64
218
219
  steps:
219
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
220
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
220
221
  with:
221
222
  persist-credentials: false
222
- - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
223
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
223
224
  with:
224
225
  python-version: 3.x
225
226
  - name: Build wheels
226
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
227
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
227
228
  with:
228
229
  target: ${{ matrix.platform.target }}
229
230
  args: --release --out dist
230
231
  sccache: false
231
232
  - name: Build free-threaded wheels
232
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
233
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
233
234
  with:
234
235
  target: ${{ matrix.platform.target }}
235
236
  args: --release --out dist -i python3.13t
236
237
 
237
238
  sccache: false
238
239
  - name: Build free-threaded wheels
239
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
240
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
240
241
  with:
241
242
  target: ${{ matrix.platform.target }}
242
243
  args: --release --out dist -i python3.14t
243
244
 
244
245
  sccache: false
245
246
  - name: Upload wheels
246
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
247
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
247
248
  with:
248
249
  name: wheels-macos-${{ matrix.platform.target }}
249
250
  path: dist
250
251
 
251
252
  sdist:
252
- runs-on: ubuntu-latest
253
+ runs-on: ubuntu-24.04
253
254
  name: Package sdist
254
255
  steps:
255
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
256
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
256
257
  with:
257
258
  persist-credentials: false
258
259
  - name: Build sdist
259
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
260
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
260
261
  with:
261
262
  command: sdist
262
263
  args: --out dist
263
264
  - name: Upload sdist
264
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
265
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
265
266
  with:
266
267
  name: wheels-sdist
267
268
  path: dist
@@ -281,7 +282,7 @@ jobs:
281
282
 
282
283
  release:
283
284
  name: Release
284
- runs-on: ubuntu-latest
285
+ runs-on: ubuntu-24.04
285
286
  if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
286
287
  needs: all-tests
287
288
  permissions:
@@ -292,31 +293,35 @@ jobs:
292
293
  # Used to generate artifact attestation
293
294
  attestations: write
294
295
  steps:
295
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
296
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
296
297
  with:
297
298
  persist-credentials: false
298
- - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
299
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
299
300
  - name: Generate artifact attestation
300
- uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
301
+ uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
301
302
  with:
302
303
  subject-path: wheels-*/*
303
304
  - name: Publish to PyPI
304
305
  if: ${{ startsWith(github.ref, 'refs/tags/') }}
305
- uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
306
+ uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
306
307
  with:
307
308
  command: upload
308
309
  args: --non-interactive --skip-existing wheels-*/*
309
310
 
310
311
  release_github:
311
- runs-on: ubuntu-latest
312
+ runs-on: ubuntu-24.04
312
313
  name: Create release on GitHub
313
314
  permissions:
314
315
  contents: write
315
316
  needs: all-tests
316
317
  if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
317
318
  steps:
318
- - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
319
- - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
319
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
320
320
  with:
321
- generateReleaseNotes: true
322
- artifacts: wheels-*/*
321
+ persist-credentials: false
322
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
323
+ - env:
324
+ VERSION: ${{ github.ref_name }}
325
+ GH_TOKEN: ${{ github.token }}
326
+ run: |
327
+ gh release create "$VERSION" --verify-tag --generate-notes wheels-*/*
@@ -0,0 +1,22 @@
1
+ # Copyright © Michal Čihař <michal@weblate.org>
2
+ #
3
+ # SPDX-License-Identifier: CC0-1.0
4
+
5
+ # This file is maintained in https://github.com/WeblateOrg/meta/
6
+ name: Dependency Review
7
+ on:
8
+ pull_request:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ dependency-review:
15
+ runs-on: ubuntu-slim
16
+ steps:
17
+ - name: Checkout Repository
18
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19
+ with:
20
+ persist-credentials: false
21
+ - name: Dependency Review
22
+ uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
@@ -10,6 +10,7 @@ on:
10
10
  branches-ignore:
11
11
  - renovate/**
12
12
  - weblate
13
+ - dependabot/**
13
14
  pull_request:
14
15
 
15
16
  permissions:
@@ -20,30 +21,24 @@ jobs:
20
21
  runs-on: ubuntu-24.04
21
22
 
22
23
  steps:
23
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
24
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24
25
  with:
25
26
  persist-credentials: false
26
- - name: Get cache tag
27
- id: get-date
28
- run: |
29
- echo "cache_tag=$(/bin/date --utc '+%Y%m')" >> "$GITHUB_OUTPUT"
30
- echo "previous_cache_tag=$(/bin/date --date='1 month ago' --utc '+%Y%m')" >> "$GITHUB_OUTPUT"
31
- shell: bash
32
- - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
33
- id: pre-commit-cache
27
+ - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
34
28
  with:
35
- path: ~/.cache/pre-commit
36
- key: ${{ runner.os }}-pre-commit-${{ steps.get-date.outputs.cache_tag }}-${{ hashFiles('.pre-commit-config.yaml') }}
29
+ path: |
30
+ ~/.cache/prek
31
+ ~/.cache/kingfisher
32
+ key: ${{ runner.os }}-prek-${{ hashFiles('.pre-commit-config.yaml') }}
37
33
  restore-keys: |
38
- ${{ runner.os }}-pre-commit-${{ steps.get-date.outputs.cache_tag }}
39
- ${{ runner.os }}-pre-commit-${{ steps.get-date.outputs.previous_cache_tag }}
40
- ${{ runner.os }}-pre-commit-
34
+ ${{ runner.os }}-prek-
41
35
  - name: Setup Python
42
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
36
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
43
37
  with:
44
38
  python-version: '3.14'
45
- - uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
39
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
46
40
  with:
41
+ version: 0.11.2
47
42
  enable-cache: false
48
43
  - name: detect method
49
44
  id: detect
@@ -52,16 +47,14 @@ jobs:
52
47
  echo "method=requirements" >> "$GITHUB_OUTPUT"
53
48
  elif test -f pyproject.toml && grep -q dependency-groups pyproject.toml ; then
54
49
  echo "method=pep735" >> "$GITHUB_OUTPUT"
55
- elif test -f pyproject.toml && grep -q dependency-groups pyproject.toml ; then
56
- echo "method=pyproject" >> "$GITHUB_OUTPUT"
57
50
  else
58
51
  echo "method=uvx" >> "$GITHUB_OUTPUT"
59
52
  fi
60
53
  - name: pre-commit (PEP 735)
61
54
  if: steps.detect.outputs.method == 'pep735'
62
55
  run: |
63
- uv run --only-group pre-commit pre-commit run --all --show-diff-on-failure
64
- uv run --only-group pre-commit pre-commit gc
56
+ uv run --only-group pre-commit prek run --all-files --show-diff-on-failure
57
+ uv run --only-group pre-commit prek cache gc
65
58
  env:
66
59
  RUFF_OUTPUT_FORMAT: github
67
60
  REUSE_OUTPUT_FORMAT: github
@@ -69,23 +62,18 @@ jobs:
69
62
  - name: pre-commit (uvx)
70
63
  if: steps.detect.outputs.method == 'uvx'
71
64
  run: |
72
- uvx pre-commit run --all --show-diff-on-failure
73
- uvx pre-commit gc
65
+ uvx prek run --all-files --show-diff-on-failure
66
+ uvx prek cache gc
74
67
  env:
75
68
  RUFF_OUTPUT_FORMAT: github
76
69
  REUSE_OUTPUT_FORMAT: github
77
70
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78
- - name: Install dependencies
71
+ - name: pre-commit (requirements)
79
72
  if: steps.detect.outputs.method == 'requirements'
80
- run: uv pip install --system -r requirements-lint.txt
81
- - name: Install dependencies
82
- if: steps.detect.outputs.method == 'pyproject'
83
- run: uv pip install --system "$(sed -n 's/.*"\(pre-commit==\([^"]*\)\)".*/\1/p' pyproject.toml)"
84
- - name: pre-commit (installed)
85
- if: steps.detect.outputs.method == 'requirements' || steps.detect.outputs.method == 'pyproject'
86
73
  run: |
87
- pre-commit run --all --show-diff-on-failure
88
- pre-commit gc
74
+ uv pip install --system -r requirements-lint.txt
75
+ prek run --all-files --show-diff-on-failure
76
+ prek cache gc
89
77
  env:
90
78
  RUFF_OUTPUT_FORMAT: github
91
79
  REUSE_OUTPUT_FORMAT: github
@@ -0,0 +1,28 @@
1
+ # Copyright © Michal Čihař <michal@weblate.org>
2
+ #
3
+ # SPDX-License-Identifier: CC0-1.0
4
+
5
+ # This file is maintained in https://github.com/WeblateOrg/meta/
6
+
7
+ name: Pull request automation
8
+
9
+ on: # zizmor: ignore[dangerous-triggers]
10
+ pull_request_target:
11
+ types: opened
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ weblate_automerge:
18
+ runs-on: ubuntu-slim
19
+ name: Weblate automerge
20
+ if: github.actor == 'weblate'
21
+ steps:
22
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23
+ with:
24
+ persist-credentials: false
25
+ - name: Enable Pull Request Automerge
26
+ run: gh pr merge --rebase --auto "${{ github.event.pull_request.number }}"
27
+ env:
28
+ GH_TOKEN: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
@@ -10,17 +10,16 @@ repos:
10
10
  - id: check-toml
11
11
  - id: check-merge-conflict
12
12
  - id: check-json
13
- - id: debug-statements
14
13
  - id: mixed-line-ending
15
14
  args: [--fix=lf]
16
15
  - id: pretty-format-json
17
16
  args: [--no-sort-keys, --autofix]
18
17
  - repo: https://github.com/adrienverge/yamllint
19
- rev: v1.37.1
18
+ rev: v1.38.0
20
19
  hooks:
21
20
  - id: yamllint
22
21
  - repo: https://github.com/astral-sh/ruff-pre-commit
23
- rev: v0.14.6
22
+ rev: v0.15.8
24
23
  hooks:
25
24
  - id: ruff-check
26
25
  args:
@@ -32,7 +31,7 @@ repos:
32
31
  - id: check-hooks-apply
33
32
  - id: check-useless-excludes
34
33
  - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
35
- rev: v2.15.0
34
+ rev: v2.16.0
36
35
  hooks:
37
36
  - id: pretty-format-yaml
38
37
  args: [--autofix, --indent, '2']
@@ -45,7 +44,7 @@ repos:
45
44
  additional_dependencies:
46
45
  - mdformat-gfm==1.0.0
47
46
  - repo: https://github.com/igorshubovych/markdownlint-cli
48
- rev: v0.46.0
47
+ rev: v0.48.0
49
48
  hooks:
50
49
  - id: markdownlint
51
50
  - repo: https://github.com/fsfe/reuse-tool
@@ -53,16 +52,19 @@ repos:
53
52
  hooks:
54
53
  - id: reuse
55
54
  - repo: https://github.com/rhysd/actionlint
56
- rev: v1.7.9
55
+ rev: v1.7.11
57
56
  hooks:
58
57
  - id: actionlint
59
58
  - repo: https://github.com/zizmorcore/zizmor-pre-commit
60
- rev: v1.17.0
59
+ rev: v1.23.1
61
60
  hooks:
62
61
  - id: zizmor
63
- - repo: https://github.com/gitleaks/gitleaks
64
- rev: v8.30.0
62
+ - repo: https://github.com/mongodb/kingfisher
63
+ rev: v1.90.0
65
64
  hooks:
66
- - id: gitleaks
65
+ - id: kingfisher-auto
67
66
  ci:
68
67
  autoupdate_schedule: quarterly
68
+ skip:
69
+ - reuse
70
+ - kingfisher-auto