Skip to content

Commit

Permalink
update upath
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Aug 3, 2023
1 parent 39ab75e commit 4025e37
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
15 changes: 8 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ zarr = "^2.14.2"
pytest-asyncio = "^0.21.0"
ruff = "^0.0.271"
s3fs = ">=2022.0.0"
universal_pathlib = "^0.0.23"
universal_pathlib = "^0.1.0"

[tool.isort]
profile = "black"
Expand Down
7 changes: 6 additions & 1 deletion zarrita/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ class Store:
def from_path(cls, pth: Path) -> Store:
try:
from upath import UPath
from upath.implementations.local import PosixUPath, WindowsUPath

if isinstance(pth, UPath):
if (
isinstance(pth, UPath)
and not isinstance(pth, PosixUPath)
and not isinstance(pth, WindowsUPath)
):
storage_options = pth._kwargs.copy()
storage_options.pop("_url", None)
return RemoteStore(str(pth), **storage_options)
Expand Down

0 comments on commit 4025e37

Please sign in to comment.