File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545from .wrap_modes import WrapModes
4646from .wrap_modes import from_string as wrap_mode_from_string
4747
48- if sys .version_info < (3 , 10 ): # pragma: no cover
49- from importlib_metadata import entry_points
50- else :
51- from importlib .metadata import entry_points
52-
5348if TYPE_CHECKING :
5449 tomllib : Any
5550else :
@@ -937,4 +932,17 @@ def _as_bool(value: str) -> bool:
937932 raise ValueError (f"invalid truth value { value } " )
938933
939934
935+ def entry_points (** params ):
936+ """Call entry_point after lazy loading it.
937+
938+ TODO: The reason for lazy loading here are unknown.
939+ """
940+ if sys .version_info < (3 , 10 ): # pragma: no cover
941+ from importlib_metadata import entry_points
942+ else :
943+ from importlib .metadata import entry_points
944+
945+ return entry_points (** params )
946+
947+
940948DEFAULT_CONFIG = Config ()
You can’t perform that action at this time.
0 commit comments