diff --git a/dandi/metadata/nwb.py b/dandi/metadata/nwb.py index 38c2ac4e7..bf43dbcb2 100644 --- a/dandi/metadata/nwb.py +++ b/dandi/metadata/nwb.py @@ -31,7 +31,7 @@ @metadata_cache.memoize_path def get_metadata( path: str | Path | Readable, digest: Digest | None = None -) -> dict | None: +) -> dict[str, Any]: """ Get "flatdata" from a .nwb file diff --git a/dandi/misctypes.py b/dandi/misctypes.py index b50cffc42..5ecc25486 100644 --- a/dandi/misctypes.py +++ b/dandi/misctypes.py @@ -343,9 +343,8 @@ class RemoteReadableAsset(Readable): def open(self) -> IO[bytes]: # Optional dependency: - import fsspec - from aiohttp import ClientTimeout + import fsspec # We need to call open() on the return value of fsspec.open() because # otherwise the filehandle will only be opened when used to enter a