Skip to content

Commit

Permalink
Fix storage option handling
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Dec 13, 2024
1 parent 455716a commit 829ef81
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sertit/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def archive(
tmp_dir.cleanup()

try:
arch = AnyPath(archive_fn, storage_options=folder_path.storage_options)
arch = AnyPath(archive_fn, **folder_path.storage_options)
except AttributeError:
arch = AnyPath(archive_fn)

Expand Down
4 changes: 1 addition & 3 deletions sertit/vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,7 @@ def read(
split_vect = str(vector_path).split("!")
archive_regex = ".*{}".format(split_vect[1].replace(".", r"\."))
try:
vector_path = AnyPath(
split_vect[0], storage_options=vector_path.storage_options
)
vector_path = AnyPath(split_vect[0], **vector_path.storage_options)
except AttributeError:
# Cloudpathlib
vector_path = AnyPath(split_vect[0])
Expand Down
2 changes: 1 addition & 1 deletion sertit/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def read_archive(
# For UPath
with contextlib.suppress(AttributeError):
archive_base_path = AnyPath(
archive_base_path, storage_options=archive_path.storage_options
archive_base_path, **archive_path.storage_options
)
else:
archive_base_path = archive_path
Expand Down

0 comments on commit 829ef81

Please sign in to comment.