summary refs log tree commit diff stats
path: root/python/scripts/mkvenv.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/scripts/mkvenv.py')
-rw-r--r--python/scripts/mkvenv.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
index 4f2349fbb6..57a2494803 100644
--- a/python/scripts/mkvenv.py
+++ b/python/scripts/mkvenv.py
@@ -435,6 +435,7 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]:
     try:
         # First preference: Python 3.8+ stdlib
         from importlib.metadata import (  # type: ignore
+            EntryPoint,
             PackageNotFoundError,
             distribution,
         )
@@ -442,6 +443,7 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]:
         logger.debug("%s", str(exc))
         # Second preference: Commonly available PyPI backport
         from importlib_metadata import (  # type: ignore
+            EntryPoint,
             PackageNotFoundError,
             distribution,
         )
@@ -449,7 +451,8 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]:
     def _generator() -> Iterator[str]:
         for package in packages:
             try:
-                entry_points = distribution(package).entry_points
+                entry_points: Iterator[EntryPoint] = \
+                    iter(distribution(package).entry_points)
             except PackageNotFoundError:
                 continue