File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 45
45
from .wrap_modes import WrapModes
46
46
from .wrap_modes import from_string as wrap_mode_from_string
47
47
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
-
53
48
if TYPE_CHECKING :
54
49
tomllib : Any
55
50
else :
@@ -937,4 +932,17 @@ def _as_bool(value: str) -> bool:
937
932
raise ValueError (f"invalid truth value { value } " )
938
933
939
934
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
+
940
948
DEFAULT_CONFIG = Config ()
You can’t perform that action at this time.
0 commit comments