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.
- {ignore_python-0.2.0 → ignore_python-0.3.1}/.github/workflows/CI.yml +7 -10
- {ignore_python-0.2.0 → ignore_python-0.3.1}/.github/workflows/docs.yml +1 -1
- {ignore_python-0.2.0 → ignore_python-0.3.1}/.gitignore +1 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/Cargo.lock +76 -123
- {ignore_python-0.2.0 → ignore_python-0.3.1}/Cargo.toml +4 -3
- {ignore_python-0.2.0 → ignore_python-0.3.1}/PKG-INFO +1 -1
- {ignore_python-0.2.0 → ignore_python-0.3.1}/ignore/__init__.pyi +16 -42
- ignore_python-0.3.1/ignore/overrides/__init__.pyi +13 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/src/lib.rs +40 -2
- {ignore_python-0.2.0 → ignore_python-0.3.1}/tests/test_root.py +10 -0
- ignore_python-0.2.0/ignore/overrides/__init__.pyi +0 -25
- {ignore_python-0.2.0 → ignore_python-0.3.1}/LICENSE.txt +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/README.md +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/ignore/__init__.py +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/ignore/overrides/py.typed +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/ignore/py.typed +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.1}/pyproject.toml +0 -0
|
@@ -8,8 +8,7 @@ name: CI
|
|
|
8
8
|
on:
|
|
9
9
|
push:
|
|
10
10
|
branches:
|
|
11
|
-
-
|
|
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 --
|
|
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:
|
|
@@ -4,35 +4,29 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "aho-corasick"
|
|
7
|
-
version = "1.1.
|
|
7
|
+
version = "1.1.4"
|
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
-
checksum = "
|
|
9
|
+
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"memchr",
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
[[package]]
|
|
15
15
|
name = "autocfg"
|
|
16
|
-
version = "1.
|
|
16
|
+
version = "1.5.0"
|
|
17
17
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
-
checksum = "
|
|
18
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
19
19
|
|
|
20
20
|
[[package]]
|
|
21
21
|
name = "bstr"
|
|
22
|
-
version = "1.
|
|
22
|
+
version = "1.12.1"
|
|
23
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
-
checksum = "
|
|
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.
|
|
57
|
+
version = "0.4.18"
|
|
64
58
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
-
checksum = "
|
|
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.
|
|
76
|
+
version = "0.4.25"
|
|
83
77
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
84
|
-
checksum = "
|
|
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.
|
|
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.
|
|
100
|
+
version = "2.0.7"
|
|
107
101
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
-
checksum = "
|
|
102
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
103
|
+
dependencies = [
|
|
104
|
+
"rustversion",
|
|
105
|
+
]
|
|
109
106
|
|
|
110
107
|
[[package]]
|
|
111
108
|
name = "libc"
|
|
112
|
-
version = "0.2.
|
|
109
|
+
version = "0.2.179"
|
|
113
110
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
114
|
-
checksum = "
|
|
111
|
+
checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f"
|
|
115
112
|
|
|
116
113
|
[[package]]
|
|
117
114
|
name = "log"
|
|
118
|
-
version = "0.4.
|
|
115
|
+
version = "0.4.29"
|
|
119
116
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
120
|
-
checksum = "
|
|
117
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
121
118
|
|
|
122
119
|
[[package]]
|
|
123
120
|
name = "memchr"
|
|
124
|
-
version = "2.7.
|
|
121
|
+
version = "2.7.6"
|
|
125
122
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
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.
|
|
142
|
+
version = "1.13.0"
|
|
146
143
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
-
checksum = "
|
|
144
|
+
checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
|
|
148
145
|
|
|
149
146
|
[[package]]
|
|
150
147
|
name = "proc-macro2"
|
|
151
|
-
version = "1.0.
|
|
148
|
+
version = "1.0.104"
|
|
152
149
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
153
|
-
checksum = "
|
|
150
|
+
checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0"
|
|
154
151
|
dependencies = [
|
|
155
152
|
"unicode-ident",
|
|
156
153
|
]
|
|
157
154
|
|
|
158
155
|
[[package]]
|
|
159
156
|
name = "pyo3"
|
|
160
|
-
version = "0.
|
|
157
|
+
version = "0.25.1"
|
|
161
158
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
-
checksum = "
|
|
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.
|
|
174
|
+
version = "0.25.1"
|
|
179
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
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.
|
|
184
|
+
version = "0.25.1"
|
|
189
185
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
190
|
-
checksum = "
|
|
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.
|
|
194
|
+
version = "0.25.1"
|
|
199
195
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
-
checksum = "
|
|
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.
|
|
206
|
+
version = "0.25.1"
|
|
211
207
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
-
checksum = "
|
|
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.
|
|
219
|
+
version = "1.0.42"
|
|
224
220
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
-
checksum = "
|
|
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.
|
|
228
|
+
version = "0.4.13"
|
|
233
229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
-
checksum = "
|
|
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.
|
|
239
|
+
version = "0.8.8"
|
|
244
240
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
245
|
-
checksum = "
|
|
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.
|
|
260
|
+
version = "1.0.228"
|
|
259
261
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
-
checksum = "
|
|
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.
|
|
278
|
+
version = "1.0.228"
|
|
268
279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
269
|
-
checksum = "
|
|
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.
|
|
289
|
+
version = "2.0.113"
|
|
279
290
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
-
checksum = "
|
|
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.
|
|
300
|
+
version = "0.13.4"
|
|
290
301
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
-
checksum = "
|
|
302
|
+
checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
|
|
292
303
|
|
|
293
304
|
[[package]]
|
|
294
305
|
name = "unicode-ident"
|
|
295
|
-
version = "1.0.
|
|
306
|
+
version = "1.0.22"
|
|
296
307
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
297
|
-
checksum = "
|
|
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.
|
|
328
|
+
version = "0.1.11"
|
|
318
329
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
-
checksum = "
|
|
330
|
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
|
320
331
|
dependencies = [
|
|
321
332
|
"windows-sys",
|
|
322
333
|
]
|
|
323
334
|
|
|
324
335
|
[[package]]
|
|
325
|
-
name = "windows-
|
|
326
|
-
version = "0.
|
|
336
|
+
name = "windows-link"
|
|
337
|
+
version = "0.2.1"
|
|
327
338
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
328
|
-
checksum = "
|
|
329
|
-
dependencies = [
|
|
330
|
-
"windows-targets",
|
|
331
|
-
]
|
|
339
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
332
340
|
|
|
333
341
|
[[package]]
|
|
334
|
-
name = "windows-
|
|
335
|
-
version = "0.
|
|
342
|
+
name = "windows-sys"
|
|
343
|
+
version = "0.61.2"
|
|
336
344
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
337
|
-
checksum = "
|
|
345
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
338
346
|
dependencies = [
|
|
339
|
-
"
|
|
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.
|
|
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.
|
|
13
|
-
ignore-rust = { version = "0.4.
|
|
13
|
+
pyo3 = "0.25.1"
|
|
14
|
+
ignore-rust = { version = "0.4.25", package = "ignore" }
|
|
@@ -5,47 +5,40 @@ from ignore.overrides import Override
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Error(Exception):
|
|
8
|
-
|
|
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
|
|
40
|
-
|
|
41
|
-
WalkBuilder builds a recursive directory iterator.
|
|
32
|
+
class Walk:
|
|
33
|
+
def __init__(self, path: pathlib.Path) -> None: ...
|
|
42
34
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
def __iter__(self) -> Self: ...
|
|
36
|
+
|
|
37
|
+
def __next__(self) -> DirEntry: ...
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
"""
|
|
@@ -73,7 +73,12 @@ impl<'py> IntoPyObject<'py> for Path<'_> {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
create_exception!(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|