Skip to content

Commit 82f9610

Browse files
authored
Merge pull request #1794 from dandi/enh-lad-type-annotations
Fix type annotation in upload sync path prefix calculation
2 parents ceeb898 + a2a5bc0 commit 82f9610

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

dandi/upload.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from collections.abc import Iterator, Sequence
55
from contextlib import ExitStack
66
from enum import Enum
7-
from functools import reduce
87
import io
98
import os.path
109
from pathlib import Path
@@ -493,7 +492,7 @@ def upload_agg(*ignored: Any) -> str:
493492
for p in paths:
494493
rp = os.path.relpath(p, dandiset.path)
495494
relpaths.append("" if rp == "." else rp)
496-
path_prefix = reduce(os.path.commonprefix, relpaths) # type: ignore[arg-type]
495+
path_prefix = os.path.commonprefix(relpaths)
497496
to_delete = []
498497
for asset in remote_dandiset.get_assets_with_path_prefix(path_prefix):
499498
if any(

0 commit comments

Comments
 (0)