File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import os .path
1212from pathlib import Path
1313from time import sleep
14- from typing import Any , Optional
14+ from typing import TYPE_CHECKING , Any , Optional
1515
16- from dandischema .models import BareAsset , DigestType
1716from pydantic import BaseModel , ConfigDict , ValidationError
1817import requests
1918from zarr_checksum .tree import ZarrChecksumTree
5554 Validator ,
5655)
5756
57+ if TYPE_CHECKING :
58+ from dandischema .models import BareAsset
59+
5860lgr = get_logger ()
5961
6062
@@ -320,6 +322,8 @@ def get_digest(self) -> Digest:
320322 directory, the algorithm will be the DANDI Zarr checksum algorithm; if
321323 it is a file, it will be MD5.
322324 """
325+ from dandischema .models import DigestType
326+
323327 # Avoid heavy import by importing within function:
324328 from dandi .support .digests import get_digest , get_zarr_checksum
325329
You can’t perform that action at this time.
0 commit comments