ignore-python 0.2.0__tar.gz → 0.3.0__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.0}/.github/workflows/CI.yml +7 -8
- {ignore_python-0.2.0 → ignore_python-0.3.0}/Cargo.lock +25 -32
- {ignore_python-0.2.0 → ignore_python-0.3.0}/Cargo.toml +3 -3
- {ignore_python-0.2.0 → ignore_python-0.3.0}/PKG-INFO +1 -1
- {ignore_python-0.2.0 → ignore_python-0.3.0}/ignore/__init__.pyi +2 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/src/lib.rs +6 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/tests/test_root.py +10 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/.github/workflows/docs.yml +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/.gitignore +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/LICENSE.txt +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/README.md +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/ignore/__init__.py +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/ignore/overrides/__init__.pyi +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/ignore/overrides/py.typed +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/ignore/py.typed +0 -0
- {ignore_python-0.2.0 → ignore_python-0.3.0}/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
|
|
|
@@ -207,7 +206,7 @@ jobs:
|
|
|
207
206
|
set -e
|
|
208
207
|
python3 -m venv .venv
|
|
209
208
|
source .venv/bin/activate
|
|
210
|
-
pip install ignore-python --find-links dist --force-reinstall
|
|
209
|
+
pip install ignore-python --find-links dist --force-reinstall --no-cache --no-index
|
|
211
210
|
pip install pytest
|
|
212
211
|
pytest
|
|
213
212
|
|
|
@@ -13,26 +13,20 @@ dependencies = [
|
|
|
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.0"
|
|
23
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
-
checksum = "
|
|
24
|
+
checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
|
|
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"
|
|
@@ -95,7 +89,7 @@ dependencies = [
|
|
|
95
89
|
|
|
96
90
|
[[package]]
|
|
97
91
|
name = "ignore-python"
|
|
98
|
-
version = "0.
|
|
92
|
+
version = "0.3.0"
|
|
99
93
|
dependencies = [
|
|
100
94
|
"ignore",
|
|
101
95
|
"pyo3",
|
|
@@ -109,9 +103,9 @@ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
|
|
|
109
103
|
|
|
110
104
|
[[package]]
|
|
111
105
|
name = "libc"
|
|
112
|
-
version = "0.2.
|
|
106
|
+
version = "0.2.174"
|
|
113
107
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
114
|
-
checksum = "
|
|
108
|
+
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
|
115
109
|
|
|
116
110
|
[[package]]
|
|
117
111
|
name = "log"
|
|
@@ -121,9 +115,9 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|
|
121
115
|
|
|
122
116
|
[[package]]
|
|
123
117
|
name = "memchr"
|
|
124
|
-
version = "2.7.
|
|
118
|
+
version = "2.7.5"
|
|
125
119
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
120
|
+
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
|
127
121
|
|
|
128
122
|
[[package]]
|
|
129
123
|
name = "memoffset"
|
|
@@ -142,26 +136,25 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
|
142
136
|
|
|
143
137
|
[[package]]
|
|
144
138
|
name = "portable-atomic"
|
|
145
|
-
version = "1.11.
|
|
139
|
+
version = "1.11.1"
|
|
146
140
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
-
checksum = "
|
|
141
|
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
|
148
142
|
|
|
149
143
|
[[package]]
|
|
150
144
|
name = "proc-macro2"
|
|
151
|
-
version = "1.0.
|
|
145
|
+
version = "1.0.95"
|
|
152
146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
153
|
-
checksum = "
|
|
147
|
+
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
|
154
148
|
dependencies = [
|
|
155
149
|
"unicode-ident",
|
|
156
150
|
]
|
|
157
151
|
|
|
158
152
|
[[package]]
|
|
159
153
|
name = "pyo3"
|
|
160
|
-
version = "0.
|
|
154
|
+
version = "0.25.1"
|
|
161
155
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
-
checksum = "
|
|
156
|
+
checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
|
|
163
157
|
dependencies = [
|
|
164
|
-
"cfg-if",
|
|
165
158
|
"indoc",
|
|
166
159
|
"libc",
|
|
167
160
|
"memoffset",
|
|
@@ -175,9 +168,9 @@ dependencies = [
|
|
|
175
168
|
|
|
176
169
|
[[package]]
|
|
177
170
|
name = "pyo3-build-config"
|
|
178
|
-
version = "0.
|
|
171
|
+
version = "0.25.1"
|
|
179
172
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
173
|
+
checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
|
|
181
174
|
dependencies = [
|
|
182
175
|
"once_cell",
|
|
183
176
|
"target-lexicon",
|
|
@@ -185,9 +178,9 @@ dependencies = [
|
|
|
185
178
|
|
|
186
179
|
[[package]]
|
|
187
180
|
name = "pyo3-ffi"
|
|
188
|
-
version = "0.
|
|
181
|
+
version = "0.25.1"
|
|
189
182
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
190
|
-
checksum = "
|
|
183
|
+
checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
|
|
191
184
|
dependencies = [
|
|
192
185
|
"libc",
|
|
193
186
|
"pyo3-build-config",
|
|
@@ -195,9 +188,9 @@ dependencies = [
|
|
|
195
188
|
|
|
196
189
|
[[package]]
|
|
197
190
|
name = "pyo3-macros"
|
|
198
|
-
version = "0.
|
|
191
|
+
version = "0.25.1"
|
|
199
192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
-
checksum = "
|
|
193
|
+
checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
|
|
201
194
|
dependencies = [
|
|
202
195
|
"proc-macro2",
|
|
203
196
|
"pyo3-macros-backend",
|
|
@@ -207,9 +200,9 @@ dependencies = [
|
|
|
207
200
|
|
|
208
201
|
[[package]]
|
|
209
202
|
name = "pyo3-macros-backend"
|
|
210
|
-
version = "0.
|
|
203
|
+
version = "0.25.1"
|
|
211
204
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
-
checksum = "
|
|
205
|
+
checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
|
|
213
206
|
dependencies = [
|
|
214
207
|
"heck",
|
|
215
208
|
"proc-macro2",
|
|
@@ -275,9 +268,9 @@ dependencies = [
|
|
|
275
268
|
|
|
276
269
|
[[package]]
|
|
277
270
|
name = "syn"
|
|
278
|
-
version = "2.0.
|
|
271
|
+
version = "2.0.104"
|
|
279
272
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
-
checksum = "
|
|
273
|
+
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
|
281
274
|
dependencies = [
|
|
282
275
|
"proc-macro2",
|
|
283
276
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "ignore-python"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
@@ -9,5 +9,5 @@ name = "ignore"
|
|
|
9
9
|
crate-type = ["cdylib"]
|
|
10
10
|
|
|
11
11
|
[dependencies]
|
|
12
|
-
pyo3 = "0.
|
|
13
|
-
ignore-rust = { version = "0.4.
|
|
12
|
+
pyo3 = "0.25.1"
|
|
13
|
+
ignore-rust = { version = "0.4.23", package = "ignore" }
|
|
@@ -69,6 +69,8 @@ class WalkBuilder:
|
|
|
69
69
|
|
|
70
70
|
def max_depth(self, depth: int | None) -> Self: ...
|
|
71
71
|
|
|
72
|
+
def max_filesize(self, filesize: int | None) -> Self: ...
|
|
73
|
+
|
|
72
74
|
def add_custom_ignore_filename(self, file_name: str) -> Self: ...
|
|
73
75
|
|
|
74
76
|
def add(self, path: pathlib.Path) -> Self: ...
|
|
@@ -258,6 +258,12 @@ mod ignore {
|
|
|
258
258
|
slf
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
fn max_filesize(mut slf: PyRefMut<'_, Self>, filesize: Option<u64>) -> PyRefMut<'_, Self> {
|
|
262
|
+
slf.0.max_filesize(filesize);
|
|
263
|
+
|
|
264
|
+
slf
|
|
265
|
+
}
|
|
266
|
+
|
|
261
267
|
fn add_custom_ignore_filename<'a>(
|
|
262
268
|
mut slf: PyRefMut<'a, Self>,
|
|
263
269
|
file_name: &str,
|
|
@@ -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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|