Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/lief/__init__.py: 92%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import os
2import sys
3import traceback
5if len(__path__) > 0 and __path__[0] not in sys.path:
6 from . import _lief # type: ignore
7 from ._lief import * # type: ignore
8 from ._lief import ( # type: ignore
9 __commit__,
10 __extended__,
11 __free_threaded__,
12 __is_tagged__,
13 __tag__,
14 __version__,
15 )
17 if __extended__:
18 from ._lief_extended import ( # type: ignore
19 __LIEF_EXTENDED_VERSION_STR__,
20 __LIEF_MAIN_COMMIT__,
21 __extended_version__,
22 )
24 # cf. https://github.com/pytorch/pytorch/blob/60a3b7425dde97fe8b46183c154a9c3b24f0c733/torch/__init__.py#L467-L470
25 for attr in dir(_lief):
26 candidate = getattr(_lief, attr)
27 if type(candidate) is type(_lief):
28 sys.modules.setdefault(f"lief.{attr}", candidate)