ignore-python 0.2.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.
@@ -8,8 +8,7 @@ name: CI
8
8
  on:
9
9
  push:
10
10
  branches:
11
- - main
12
- - master
11
+ - '**'
13
12
  tags:
14
13
  - '*'
15
14
  pull_request:
@@ -60,7 +59,7 @@ jobs:
60
59
  set -e
61
60
  python3 -m venv .venv
62
61
  source .venv/bin/activate
63
- pip install ignore-python --find-links dist --force-reinstall
62
+ pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
64
63
  pip install pytest
65
64
  pytest
66
65
  - name: pytest
@@ -76,7 +75,7 @@ jobs:
76
75
  pip3 install -U pip pytest
77
76
  run: |
78
77
  set -e
79
- pip3 install ignore-python --find-links dist --force-reinstall
78
+ pip3 install ignore-python --find-links dist --force-reinstall --no-cache --no-index
80
79
  pytest
81
80
 
82
81
  musllinux:
@@ -120,7 +119,7 @@ jobs:
120
119
  apk add py3-pip py3-virtualenv
121
120
  python3 -m virtualenv .venv
122
121
  source .venv/bin/activate
123
- pip install ignore-python --no-index --find-links dist --force-reinstall
122
+ pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
124
123
  pip install pytest
125
124
  pytest
126
125
  - name: pytest
@@ -137,7 +136,7 @@ jobs:
137
136
  python3 -m virtualenv .venv
138
137
  source .venv/bin/activate
139
138
  pip install pytest
140
- pip install ignore-python --find-links dist --force-reinstall
139
+ pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
141
140
  pytest
142
141
 
143
142
  windows:
@@ -173,7 +172,7 @@ jobs:
173
172
  set -e
174
173
  python3 -m venv .venv
175
174
  source .venv/Scripts/activate
176
- pip install ignore-python --find-links dist --force-reinstall
175
+ pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
177
176
  pip install pytest
178
177
  pytest
179
178
 
@@ -182,8 +181,6 @@ jobs:
182
181
  strategy:
183
182
  matrix:
184
183
  platform:
185
- - runner: macos-13
186
- target: x86_64
187
184
  - runner: macos-14
188
185
  target: aarch64
189
186
  steps:
@@ -207,7 +204,7 @@ jobs:
207
204
  set -e
208
205
  python3 -m venv .venv
209
206
  source .venv/bin/activate
210
- pip install ignore-python --find-links dist --force-reinstall
207
+ pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
211
208
  pip install pytest
212
209
  pytest
213
210
 
@@ -23,7 +23,7 @@ jobs:
23
23
  - run: python3 -m venv .venv
24
24
  - run: source .venv/bin/activate && pip install maturin pdoc
25
25
  - run: source .venv/bin/activate && maturin dev
26
- - run: source .venv/bin/activate && pdoc -o docs/ --no-show-source 'ignore' '!ignore.ignore'
26
+ - run: source .venv/bin/activate && pdoc -o docs/ --include-undocumented --no-show-source 'ignore' '!ignore.ignore'
27
27
 
28
28
  - uses: actions/upload-pages-artifact@v3
29
29
  with:
@@ -1,4 +1,5 @@
1
1
  /target
2
+ /docs
2
3
 
3
4
  # Byte-compiled / optimized / DLL files
4
5
  __pycache__/
@@ -4,35 +4,29 @@ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
7
- version = "1.1.3"
7
+ version = "1.1.4"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
9
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
10
10
  dependencies = [
11
11
  "memchr",
12
12
  ]
13
13
 
14
14
  [[package]]
15
15
  name = "autocfg"
16
- version = "1.4.0"
16
+ version = "1.5.0"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
18
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
19
19
 
20
20
  [[package]]
21
21
  name = "bstr"
22
- version = "1.11.3"
22
+ version = "1.12.1"
23
23
  source = "registry+https://github.com/rust-lang/crates.io-index"
24
- checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0"
24
+ checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
25
25
  dependencies = [
26
26
  "memchr",
27
27
  "serde",
28
28
  ]
29
29
 
30
- [[package]]
31
- name = "cfg-if"
32
- version = "1.0.0"
33
- source = "registry+https://github.com/rust-lang/crates.io-index"
34
- checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
35
-
36
30
  [[package]]
37
31
  name = "crossbeam-deque"
38
32
  version = "0.8.6"
@@ -60,9 +54,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
60
54
 
61
55
  [[package]]
62
56
  name = "globset"
63
- version = "0.4.16"
57
+ version = "0.4.18"
64
58
  source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5"
59
+ checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3"
66
60
  dependencies = [
67
61
  "aho-corasick",
68
62
  "bstr",
@@ -79,9 +73,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
79
73
 
80
74
  [[package]]
81
75
  name = "ignore"
82
- version = "0.4.23"
76
+ version = "0.4.25"
83
77
  source = "registry+https://github.com/rust-lang/crates.io-index"
84
- checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b"
78
+ checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a"
85
79
  dependencies = [
86
80
  "crossbeam-deque",
87
81
  "globset",
@@ -95,7 +89,7 @@ dependencies = [
95
89
 
96
90
  [[package]]
97
91
  name = "ignore-python"
98
- version = "0.2.0"
92
+ version = "0.3.1"
99
93
  dependencies = [
100
94
  "ignore",
101
95
  "pyo3",
@@ -103,27 +97,30 @@ dependencies = [
103
97
 
104
98
  [[package]]
105
99
  name = "indoc"
106
- version = "2.0.6"
100
+ version = "2.0.7"
107
101
  source = "registry+https://github.com/rust-lang/crates.io-index"
108
- checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
102
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
103
+ dependencies = [
104
+ "rustversion",
105
+ ]
109
106
 
110
107
  [[package]]
111
108
  name = "libc"
112
- version = "0.2.171"
109
+ version = "0.2.179"
113
110
  source = "registry+https://github.com/rust-lang/crates.io-index"
114
- checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
111
+ checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f"
115
112
 
116
113
  [[package]]
117
114
  name = "log"
118
- version = "0.4.27"
115
+ version = "0.4.29"
119
116
  source = "registry+https://github.com/rust-lang/crates.io-index"
120
- checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
117
+ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
121
118
 
122
119
  [[package]]
123
120
  name = "memchr"
124
- version = "2.7.4"
121
+ version = "2.7.6"
125
122
  source = "registry+https://github.com/rust-lang/crates.io-index"
126
- checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
123
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
127
124
 
128
125
  [[package]]
129
126
  name = "memoffset"
@@ -142,26 +139,25 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
142
139
 
143
140
  [[package]]
144
141
  name = "portable-atomic"
145
- version = "1.11.0"
142
+ version = "1.13.0"
146
143
  source = "registry+https://github.com/rust-lang/crates.io-index"
147
- checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
144
+ checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
148
145
 
149
146
  [[package]]
150
147
  name = "proc-macro2"
151
- version = "1.0.94"
148
+ version = "1.0.104"
152
149
  source = "registry+https://github.com/rust-lang/crates.io-index"
153
- checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
150
+ checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0"
154
151
  dependencies = [
155
152
  "unicode-ident",
156
153
  ]
157
154
 
158
155
  [[package]]
159
156
  name = "pyo3"
160
- version = "0.24.1"
157
+ version = "0.25.1"
161
158
  source = "registry+https://github.com/rust-lang/crates.io-index"
162
- checksum = "17da310086b068fbdcefbba30aeb3721d5bb9af8db4987d6735b2183ca567229"
159
+ checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
163
160
  dependencies = [
164
- "cfg-if",
165
161
  "indoc",
166
162
  "libc",
167
163
  "memoffset",
@@ -175,9 +171,9 @@ dependencies = [
175
171
 
176
172
  [[package]]
177
173
  name = "pyo3-build-config"
178
- version = "0.24.1"
174
+ version = "0.25.1"
179
175
  source = "registry+https://github.com/rust-lang/crates.io-index"
180
- checksum = "e27165889bd793000a098bb966adc4300c312497ea25cf7a690a9f0ac5aa5fc1"
176
+ checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
181
177
  dependencies = [
182
178
  "once_cell",
183
179
  "target-lexicon",
@@ -185,9 +181,9 @@ dependencies = [
185
181
 
186
182
  [[package]]
187
183
  name = "pyo3-ffi"
188
- version = "0.24.1"
184
+ version = "0.25.1"
189
185
  source = "registry+https://github.com/rust-lang/crates.io-index"
190
- checksum = "05280526e1dbf6b420062f3ef228b78c0c54ba94e157f5cb724a609d0f2faabc"
186
+ checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
191
187
  dependencies = [
192
188
  "libc",
193
189
  "pyo3-build-config",
@@ -195,9 +191,9 @@ dependencies = [
195
191
 
196
192
  [[package]]
197
193
  name = "pyo3-macros"
198
- version = "0.24.1"
194
+ version = "0.25.1"
199
195
  source = "registry+https://github.com/rust-lang/crates.io-index"
200
- checksum = "5c3ce5686aa4d3f63359a5100c62a127c9f15e8398e5fdeb5deef1fed5cd5f44"
196
+ checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
201
197
  dependencies = [
202
198
  "proc-macro2",
203
199
  "pyo3-macros-backend",
@@ -207,9 +203,9 @@ dependencies = [
207
203
 
208
204
  [[package]]
209
205
  name = "pyo3-macros-backend"
210
- version = "0.24.1"
206
+ version = "0.25.1"
211
207
  source = "registry+https://github.com/rust-lang/crates.io-index"
212
- checksum = "f4cf6faa0cbfb0ed08e89beb8103ae9724eb4750e3a78084ba4017cbe94f3855"
208
+ checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
213
209
  dependencies = [
214
210
  "heck",
215
211
  "proc-macro2",
@@ -220,18 +216,18 @@ dependencies = [
220
216
 
221
217
  [[package]]
222
218
  name = "quote"
223
- version = "1.0.40"
219
+ version = "1.0.42"
224
220
  source = "registry+https://github.com/rust-lang/crates.io-index"
225
- checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
221
+ checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
226
222
  dependencies = [
227
223
  "proc-macro2",
228
224
  ]
229
225
 
230
226
  [[package]]
231
227
  name = "regex-automata"
232
- version = "0.4.9"
228
+ version = "0.4.13"
233
229
  source = "registry+https://github.com/rust-lang/crates.io-index"
234
- checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
230
+ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
235
231
  dependencies = [
236
232
  "aho-corasick",
237
233
  "memchr",
@@ -240,9 +236,15 @@ dependencies = [
240
236
 
241
237
  [[package]]
242
238
  name = "regex-syntax"
243
- version = "0.8.5"
239
+ version = "0.8.8"
244
240
  source = "registry+https://github.com/rust-lang/crates.io-index"
245
- checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
241
+ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
242
+
243
+ [[package]]
244
+ name = "rustversion"
245
+ version = "1.0.22"
246
+ source = "registry+https://github.com/rust-lang/crates.io-index"
247
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
246
248
 
247
249
  [[package]]
248
250
  name = "same-file"
@@ -255,18 +257,27 @@ dependencies = [
255
257
 
256
258
  [[package]]
257
259
  name = "serde"
258
- version = "1.0.219"
260
+ version = "1.0.228"
259
261
  source = "registry+https://github.com/rust-lang/crates.io-index"
260
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
262
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
263
+ dependencies = [
264
+ "serde_core",
265
+ ]
266
+
267
+ [[package]]
268
+ name = "serde_core"
269
+ version = "1.0.228"
270
+ source = "registry+https://github.com/rust-lang/crates.io-index"
271
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
261
272
  dependencies = [
262
273
  "serde_derive",
263
274
  ]
264
275
 
265
276
  [[package]]
266
277
  name = "serde_derive"
267
- version = "1.0.219"
278
+ version = "1.0.228"
268
279
  source = "registry+https://github.com/rust-lang/crates.io-index"
269
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
280
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
270
281
  dependencies = [
271
282
  "proc-macro2",
272
283
  "quote",
@@ -275,9 +286,9 @@ dependencies = [
275
286
 
276
287
  [[package]]
277
288
  name = "syn"
278
- version = "2.0.100"
289
+ version = "2.0.113"
279
290
  source = "registry+https://github.com/rust-lang/crates.io-index"
280
- checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
291
+ checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4"
281
292
  dependencies = [
282
293
  "proc-macro2",
283
294
  "quote",
@@ -286,15 +297,15 @@ dependencies = [
286
297
 
287
298
  [[package]]
288
299
  name = "target-lexicon"
289
- version = "0.13.2"
300
+ version = "0.13.4"
290
301
  source = "registry+https://github.com/rust-lang/crates.io-index"
291
- checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
302
+ checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
292
303
 
293
304
  [[package]]
294
305
  name = "unicode-ident"
295
- version = "1.0.18"
306
+ version = "1.0.22"
296
307
  source = "registry+https://github.com/rust-lang/crates.io-index"
297
- checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
308
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
298
309
 
299
310
  [[package]]
300
311
  name = "unindent"
@@ -314,82 +325,24 @@ dependencies = [
314
325
 
315
326
  [[package]]
316
327
  name = "winapi-util"
317
- version = "0.1.9"
328
+ version = "0.1.11"
318
329
  source = "registry+https://github.com/rust-lang/crates.io-index"
319
- checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
330
+ checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
320
331
  dependencies = [
321
332
  "windows-sys",
322
333
  ]
323
334
 
324
335
  [[package]]
325
- name = "windows-sys"
326
- version = "0.59.0"
336
+ name = "windows-link"
337
+ version = "0.2.1"
327
338
  source = "registry+https://github.com/rust-lang/crates.io-index"
328
- checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
329
- dependencies = [
330
- "windows-targets",
331
- ]
339
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
332
340
 
333
341
  [[package]]
334
- name = "windows-targets"
335
- version = "0.52.6"
342
+ name = "windows-sys"
343
+ version = "0.61.2"
336
344
  source = "registry+https://github.com/rust-lang/crates.io-index"
337
- checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
345
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
338
346
  dependencies = [
339
- "windows_aarch64_gnullvm",
340
- "windows_aarch64_msvc",
341
- "windows_i686_gnu",
342
- "windows_i686_gnullvm",
343
- "windows_i686_msvc",
344
- "windows_x86_64_gnu",
345
- "windows_x86_64_gnullvm",
346
- "windows_x86_64_msvc",
347
+ "windows-link",
347
348
  ]
348
-
349
- [[package]]
350
- name = "windows_aarch64_gnullvm"
351
- version = "0.52.6"
352
- source = "registry+https://github.com/rust-lang/crates.io-index"
353
- checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
354
-
355
- [[package]]
356
- name = "windows_aarch64_msvc"
357
- version = "0.52.6"
358
- source = "registry+https://github.com/rust-lang/crates.io-index"
359
- checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
360
-
361
- [[package]]
362
- name = "windows_i686_gnu"
363
- version = "0.52.6"
364
- source = "registry+https://github.com/rust-lang/crates.io-index"
365
- checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
366
-
367
- [[package]]
368
- name = "windows_i686_gnullvm"
369
- version = "0.52.6"
370
- source = "registry+https://github.com/rust-lang/crates.io-index"
371
- checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
372
-
373
- [[package]]
374
- name = "windows_i686_msvc"
375
- version = "0.52.6"
376
- source = "registry+https://github.com/rust-lang/crates.io-index"
377
- checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
378
-
379
- [[package]]
380
- name = "windows_x86_64_gnu"
381
- version = "0.52.6"
382
- source = "registry+https://github.com/rust-lang/crates.io-index"
383
- checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
384
-
385
- [[package]]
386
- name = "windows_x86_64_gnullvm"
387
- version = "0.52.6"
388
- source = "registry+https://github.com/rust-lang/crates.io-index"
389
- checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
390
-
391
- [[package]]
392
- name = "windows_x86_64_msvc"
393
- version = "0.52.6"
394
- source = "registry+https://github.com/rust-lang/crates.io-index"
395
- checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
@@ -1,7 +1,8 @@
1
1
  [package]
2
2
  name = "ignore-python"
3
- version = "0.2.0"
3
+ version = "0.3.1"
4
4
  edition = "2021"
5
+ readme = "README.md"
5
6
 
6
7
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
  [lib]
@@ -9,5 +10,5 @@ name = "ignore"
9
10
  crate-type = ["cdylib"]
10
11
 
11
12
  [dependencies]
12
- pyo3 = "0.24.1"
13
- ignore-rust = { version = "0.4.22", package = "ignore" }
13
+ pyo3 = "0.25.1"
14
+ ignore-rust = { version = "0.4.25", package = "ignore" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ignore-python
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -5,47 +5,40 @@ from ignore.overrides import Override
5
5
 
6
6
 
7
7
  class Error(Exception):
8
- """Represents an error that can occur during operations."""
9
-
8
+ """
9
+ Represents an error that can occur during operations.
10
+ """
10
11
 
11
12
  class IOError(Exception):
12
13
  """
13
14
  An error that occurs when doing I/O.
14
15
 
15
- Currently, the only case where this error is used is for operating
16
- system errors of type ENOENT.
16
+ Currently, the only case where this error is used is for operating system errors of type `ENOENT`.
17
17
  """
18
18
 
19
19
  errno: int
20
- """A numeric error code from the C variable errno."""
21
20
 
22
21
  filename: str
23
- """The file system path involved."""
24
22
 
23
+ def __init__(self, errno: int, strerror: str, filename: str) -> None: ...
25
24
 
26
- class DirEntry:
27
- """
28
- A directory entry.
29
-
30
- See https://docs.rs/ignore/latest/ignore/struct.DirEntry.html for
31
- more information.
32
- """
33
25
 
26
+ class DirEntry:
34
27
  def path(self) -> pathlib.Path: ...
35
28
 
36
29
  def depth(self) -> int: ...
37
30
 
38
31
 
39
- class WalkBuilder:
40
- """
41
- WalkBuilder builds a recursive directory iterator.
32
+ class Walk:
33
+ def __init__(self, path: pathlib.Path) -> None: ...
42
34
 
43
- See https://docs.rs/ignore/latest/ignore/struct.WalkBuilder.html
44
- for more information.
45
- """
35
+ def __iter__(self) -> Self: ...
36
+
37
+ def __next__(self) -> DirEntry: ...
46
38
 
47
- def __init__(self, path: pathlib.Path) -> None:
48
- """Create a new builder for a recursive directory iterator for the directory given."""
39
+
40
+ class WalkBuilder:
41
+ def __init__(self, path: pathlib.Path) -> None: ...
49
42
 
50
43
  def hidden(self, yes: bool) -> Self: ...
51
44
 
@@ -69,6 +62,8 @@ class WalkBuilder:
69
62
 
70
63
  def max_depth(self, depth: int | None) -> Self: ...
71
64
 
65
+ def max_filesize(self, filesize: int | None) -> Self: ...
66
+
72
67
  def add_custom_ignore_filename(self, file_name: str) -> Self: ...
73
68
 
74
69
  def add(self, path: pathlib.Path) -> Self: ...
@@ -77,24 +72,3 @@ class WalkBuilder:
77
72
 
78
73
  def build(self) -> Walk: ...
79
74
 
80
-
81
- class Walk:
82
- """
83
- Walk is a recursive directory iterator over file paths in one or more directories.
84
-
85
- See https://docs.rs/ignore/latest/ignore/struct.Walk.html for more
86
- information.
87
- """
88
-
89
- def __init__(self, path: pathlib.Path) -> None:
90
- """Creates a new recursive directory iterator for the file path given."""
91
-
92
- def __iter__(self) -> Self: ...
93
-
94
- def __next__(self) -> DirEntry:
95
- """
96
- Advances the iterator and returns the next value.
97
-
98
- :raises IOError: Currently, only when a ENOENT error happens
99
- (e.g. broken symlinks when following them)
100
- """
@@ -0,0 +1,13 @@
1
+ import pathlib
2
+ from typing import Self
3
+
4
+
5
+ class Override: ...
6
+
7
+
8
+ class OverrideBuilder:
9
+ def __init__(self, path: pathlib.Path) -> None: ...
10
+
11
+ def build(self) -> Override: ...
12
+
13
+ def add(self, glob: str) -> Self: ...
@@ -73,7 +73,12 @@ impl<'py> IntoPyObject<'py> for Path<'_> {
73
73
  }
74
74
  }
75
75
 
76
- create_exception!(ignore, Error, pyo3::exceptions::PyException);
76
+ create_exception!(
77
+ ignore,
78
+ Error,
79
+ pyo3::exceptions::PyException,
80
+ "Represents an error that can occur during operations."
81
+ );
77
82
 
78
83
  #[pymodule]
79
84
  mod ignore {
@@ -83,13 +88,19 @@ mod ignore {
83
88
 
84
89
  struct ErrorWrapper(ignore_rust::Error);
85
90
 
91
+ /// An error that occurs when doing I/O.
92
+ ///
93
+ /// Currently, the only case where this error is used is for operating
94
+ /// system errors of type `ENOENT`.
86
95
  #[pyclass(extends=pyo3::exceptions::PyException)]
87
96
  struct IOError {
97
+ /// A numeric error code from the C variable errno.
88
98
  #[pyo3(get)]
89
99
  errno: u32,
90
100
 
91
101
  strerror: String,
92
102
 
103
+ /// The file system path involved.
93
104
  #[pyo3(get)]
94
105
  filename: String,
95
106
  }
@@ -165,12 +176,16 @@ mod ignore {
165
176
  overrides.add_class::<overrides::Override>()
166
177
  }
167
178
 
179
+ /// A directory entry.
180
+ ///
181
+ /// See https://docs.rs/ignore/0.4.25/ignore/struct.DirEntry.html for
182
+ /// more information.
168
183
  #[pyclass]
169
184
  struct DirEntry(ignore_rust::DirEntry);
170
185
 
171
186
  #[pymethods]
172
187
  impl DirEntry {
173
- fn path(&self) -> Path {
188
+ fn path(&self) -> Path<'_> {
174
189
  Path(self.0.path())
175
190
  }
176
191
 
@@ -179,6 +194,10 @@ mod ignore {
179
194
  }
180
195
  }
181
196
 
197
+ /// WalkBuilder builds a recursive directory iterator for the directory given.
198
+ ///
199
+ /// See https://docs.rs/ignore/0.4.25/ignore/struct.WalkBuilder.html
200
+ /// for more information.
182
201
  #[pyclass]
183
202
  struct WalkBuilder(ignore_rust::WalkBuilder);
184
203
 
@@ -258,6 +277,12 @@ mod ignore {
258
277
  slf
259
278
  }
260
279
 
280
+ fn max_filesize(mut slf: PyRefMut<'_, Self>, filesize: Option<u64>) -> PyRefMut<'_, Self> {
281
+ slf.0.max_filesize(filesize);
282
+
283
+ slf
284
+ }
285
+
261
286
  fn add_custom_ignore_filename<'a>(
262
287
  mut slf: PyRefMut<'a, Self>,
263
288
  file_name: &str,
@@ -286,6 +311,13 @@ mod ignore {
286
311
  }
287
312
  }
288
313
 
314
+ /// Walk is a recursive directory iterator over file paths in one or more directories.
315
+ ///
316
+ /// Currently, `__next__` raises `IOError` only when a `ENOENT` error happens (e.g. broken
317
+ /// symlinks when following them).
318
+ ///
319
+ /// See https://docs.rs/ignore/0.4.25/ignore/struct.Walk.html for more
320
+ /// information.
289
321
  #[pyclass]
290
322
  struct Walk(ignore_rust::Walk);
291
323
 
@@ -310,10 +342,16 @@ mod ignore {
310
342
  mod overrides {
311
343
  use super::*;
312
344
 
345
+ /// Manages a set of overrides provided explicitly by the end user.
346
+ ///
347
+ /// See https://docs.rs/ignore/0.4.25/ignore/overrides/struct.Override.html for more information.
313
348
  #[pyclass]
314
349
  #[derive(Clone)]
315
350
  pub struct Override(pub ignore_rust::overrides::Override);
316
351
 
352
+ /// Builds a matcher for a set of glob overrides.
353
+ ///
354
+ /// See https://docs.rs/ignore/0.4.25/ignore/overrides/struct.OverrideBuilder.html for more information.
317
355
  #[pyclass]
318
356
  pub struct OverrideBuilder(ignore_rust::overrides::OverrideBuilder);
319
357
 
@@ -38,6 +38,16 @@ def test_max_depth():
38
38
  with pytest.raises(OverflowError):
39
39
  WalkBuilder(PATH).max_depth(-1)
40
40
 
41
+ def test_max_filesize():
42
+ builder = (WalkBuilder(PATH)
43
+ .max_filesize(42)
44
+ )
45
+
46
+ assert type(builder) == WalkBuilder
47
+
48
+ with pytest.raises(OverflowError):
49
+ WalkBuilder(PATH).max_filesize(-1)
50
+
41
51
  def test_add_custom_ignore_filename():
42
52
  builder = WalkBuilder(PATH).add_custom_ignore_filename("foo")
43
53
 
@@ -1,25 +0,0 @@
1
- import pathlib
2
- from typing import Self
3
-
4
-
5
- class Override:
6
- """
7
- Manages a set of overrides provided explicitly by the end user.
8
-
9
- See https://docs.rs/ignore/latest/ignore/overrides/struct.Override.html for more information.
10
- """
11
-
12
-
13
- class OverrideBuilder:
14
- """
15
- Builds a matcher for a set of glob overrides.
16
-
17
- See https://docs.rs/ignore/latest/ignore/overrides/struct.OverrideBuilder.html for more information.
18
- """
19
-
20
- def __init__(self, path: pathlib.Path) -> None:
21
- """Create a new override builder."""
22
-
23
- def build(self) -> Override: ...
24
-
25
- def add(self, glob: str) -> Self: ...
File without changes
File without changes