Skip to content

Commit 0cf6f2a

Browse files
committed
Fix EntryPoints import
1 parent 424c45c commit 0cf6f2a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

numcodecs/registry.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
applications to dynamically register and look-up codec classes."""
33

44
import logging
5-
from importlib.metadata import EntryPoints, entry_points
5+
from importlib.metadata import entry_points
6+
from typing import TYPE_CHECKING
67

78
from numcodecs.abc import Codec
89

10+
if TYPE_CHECKING:
11+
from importlib.metadata import EntryPoints
12+
913
logger = logging.getLogger("numcodecs")
1014
codec_registry: dict[str, Codec] = {}
11-
entries: dict[str, EntryPoints] = {}
15+
entries: dict[str, "EntryPoints"] = {}
1216

1317

1418
def run_entrypoints():

0 commit comments

Comments
 (0)