Skip to content

Commit 2827711

Browse files
authored
Merge pull request #1707 from dandi/bf-typing
Workaround typing errors with unittest.mock.ANY in mypy 1.18.1
2 parents b640175 + d2b045d commit 2827711

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

dandi/tests/test_files.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -200,49 +200,49 @@ def test_find_dandi_files_with_bids(tmp_path: Path) -> None:
200200
filepath=tmp_path / "bids1" / "dataset_description.json",
201201
path="bids1/dataset_description.json",
202202
dandiset_path=tmp_path,
203-
dataset_files=ANY,
203+
dataset_files=ANY, # type: ignore[arg-type]
204204
),
205205
GenericBIDSAsset(
206206
filepath=tmp_path / "bids1" / "file.txt",
207207
path="bids1/file.txt",
208208
dandiset_path=tmp_path,
209-
bids_dataset_description_ref=ANY,
209+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
210210
),
211211
ZarrBIDSAsset(
212212
filepath=tmp_path / "bids1" / "subdir" / "glarch.zarr",
213213
path="bids1/subdir/glarch.zarr",
214214
dandiset_path=tmp_path,
215-
bids_dataset_description_ref=ANY,
215+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
216216
),
217217
NWBBIDSAsset(
218218
filepath=tmp_path / "bids1" / "subdir" / "quux.nwb",
219219
path="bids1/subdir/quux.nwb",
220220
dandiset_path=tmp_path,
221-
bids_dataset_description_ref=ANY,
221+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
222222
),
223223
BIDSDatasetDescriptionAsset(
224224
filepath=tmp_path / "bids2" / "dataset_description.json",
225225
path="bids2/dataset_description.json",
226226
dandiset_path=tmp_path,
227-
dataset_files=ANY,
227+
dataset_files=ANY, # type: ignore[arg-type]
228228
),
229229
GenericBIDSAsset(
230230
filepath=tmp_path / "bids2" / "movie.mp4",
231231
path="bids2/movie.mp4",
232232
dandiset_path=tmp_path,
233-
bids_dataset_description_ref=ANY,
233+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
234234
),
235235
GenericBIDSAsset(
236236
filepath=tmp_path / "bids2" / "subbids" / "data.json",
237237
path="bids2/subbids/data.json",
238238
dandiset_path=tmp_path,
239-
bids_dataset_description_ref=ANY,
239+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
240240
),
241241
GenericBIDSAsset(
242242
filepath=tmp_path / "bids2" / "subbids" / "dataset_description.json",
243243
path="bids2/subbids/dataset_description.json",
244244
dandiset_path=tmp_path,
245-
bids_dataset_description_ref=ANY,
245+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
246246
),
247247
]
248248

@@ -253,19 +253,19 @@ def test_find_dandi_files_with_bids(tmp_path: Path) -> None:
253253
filepath=tmp_path / "bids1" / "file.txt",
254254
path="bids1/file.txt",
255255
dandiset_path=tmp_path,
256-
bids_dataset_description_ref=ANY,
256+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
257257
),
258258
ZarrBIDSAsset(
259259
filepath=tmp_path / "bids1" / "subdir" / "glarch.zarr",
260260
path="bids1/subdir/glarch.zarr",
261261
dandiset_path=tmp_path,
262-
bids_dataset_description_ref=ANY,
262+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
263263
),
264264
NWBBIDSAsset(
265265
filepath=tmp_path / "bids1" / "subdir" / "quux.nwb",
266266
path="bids1/subdir/quux.nwb",
267267
dandiset_path=tmp_path,
268-
bids_dataset_description_ref=ANY,
268+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
269269
),
270270
]
271271
for asset in bidsdd.dataset_files:
@@ -278,19 +278,19 @@ def test_find_dandi_files_with_bids(tmp_path: Path) -> None:
278278
filepath=tmp_path / "bids2" / "movie.mp4",
279279
path="bids2/movie.mp4",
280280
dandiset_path=tmp_path,
281-
bids_dataset_description_ref=ANY,
281+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
282282
),
283283
GenericBIDSAsset(
284284
filepath=tmp_path / "bids2" / "subbids" / "data.json",
285285
path="bids2/subbids/data.json",
286286
dandiset_path=tmp_path,
287-
bids_dataset_description_ref=ANY,
287+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
288288
),
289289
GenericBIDSAsset(
290290
filepath=tmp_path / "bids2" / "subbids" / "dataset_description.json",
291291
path="bids2/subbids/dataset_description.json",
292292
dandiset_path=tmp_path,
293-
bids_dataset_description_ref=ANY,
293+
bids_dataset_description_ref=ANY, # type: ignore[arg-type]
294294
),
295295
]
296296
for asset in bidsdd.dataset_files:

0 commit comments

Comments
 (0)