[d9566e]: / sybil / __init__.py

Download this file

26 lines (20 with data), 857 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# type: ignore
import sys
if sys.version_info[:2] >= (3, 8):
# TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
else:
from importlib_metadata import PackageNotFoundError, version # pragma: no cover
try:
# Change here if project is renamed and does not equal the package name
dist_name = __name__
__version__ = version(dist_name)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
finally:
del version, PackageNotFoundError
from sybil.model import Sybil
from sybil.serie import Serie
from sybil.utils.visualization import visualize_attentions, collate_attentions
import sybil.utils.logging_utils
__all__ = ["Sybil", "Serie", "visualize_attentions", "collate_attentions", "__version__"]