Skip to content

Commit

Permalink
Fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Aug 3, 2022
1 parent bce33d1 commit 5d30d49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dandi/files/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from typing import Optional
import weakref

from dandi.validate import validate_bids

from .bases import GenericAsset, LocalFileAsset, NWBAsset
from .zarr import ZarrAsset

Expand Down Expand Up @@ -45,6 +43,9 @@ def bids_root(self) -> Path:
def _validate(self) -> None:
with self._lock:
if self._dataset_errors is None:
# Import here to avoid circular import
from dandi.validate import validate_bids

bids_paths = [str(self.filepath)] + [
str(asset.filepath) for asset in self.dataset_files
]
Expand Down

0 comments on commit 5d30d49

Please sign in to comment.