Source code for carbatpy.optional.expander_liege

from __future__ import annotations
from importlib.util import find_spec

[docs] HAS_EXPANDER_LIEGE = find_spec("expander_liege") is not None
if HAS_EXPANDER_LIEGE: from expander_liege import ExpanderSE # noqa: F401 else:
[docs] ExpanderSE = None # type: ignore[assignment]
[docs] def require_expander_liege() -> None: if not HAS_EXPANDER_LIEGE: raise ImportError( "Optional dependency 'expander-liege' is not installed. " "Install it e.g. with 'pip install expander-liege'" )