Skip to content

Commit

Permalink
Remove type checking guards
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Oct 25, 2024
1 parent dadd527 commit 1d216e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 2 additions & 4 deletions numcodecs/checksum32.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import struct
import zlib
from collections.abc import Callable
from typing import TYPE_CHECKING, Optional
from typing import Optional

import numpy as np
from typing_extensions import Buffer

from .abc import Codec
from .compat import ensure_contiguous_ndarray, ndarray_copy
from .jenkins import jenkins_lookup3

if TYPE_CHECKING:
from typing_extensions import Buffer


class Checksum32(Codec):
# override in sub-class
Expand Down
6 changes: 1 addition & 5 deletions numcodecs/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
applications to dynamically register and look-up codec classes."""

import logging
from importlib.metadata import entry_points
from typing import TYPE_CHECKING
from importlib.metadata import EntryPoints, entry_points

from numcodecs.abc import Codec

if TYPE_CHECKING:
from importlib.metadata import EntryPoints

logger = logging.getLogger("numcodecs")
codec_registry: dict[str, Codec] = {}
entries: dict[str, "EntryPoints"] = {}
Expand Down

0 comments on commit 1d216e2

Please sign in to comment.