Skip to content

Commit 257bfc5

Browse files
committed
Fix pybids import in __init__.py
Make conditional using importlib, only necessary for the documentation generation
1 parent 39b814f commit 257bfc5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

bids2table/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
"format_bids_path",
1515
"load_bids_metadata",
1616
"cloudpathlib_is_available",
17-
"pybids",
1817
]
1918

20-
from . import pybids
19+
import importlib.util
20+
21+
if importlib.util.find_spec("pandas"):
22+
__all__.append("pybids")
23+
2124
from ._entities import (
2225
format_bids_path,
2326
get_bids_entity_arrow_schema,

0 commit comments

Comments
 (0)