We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b483543 commit e738e2fCopy full SHA for e738e2f
src/zarr/storage/_common.py
@@ -31,8 +31,12 @@
31
32
33
def _dereference_path(root: str, path: str) -> str:
34
- assert isinstance(root, str)
35
- assert isinstance(path, str)
+ if not isinstance(root, str):
+ msg = f"{root=} is not a string ({type(root)=})" # type: ignore[unreachable]
36
+ raise TypeError(msg)
37
+ if not isinstance(path, str):
38
+ msg = f"{path=} is not a string ({type(path)=})" # type: ignore[unreachable]
39
40
root = root.rstrip("/")
41
path = f"{root}/{path}" if root else path
42
return path.rstrip("/")
0 commit comments