Skip to content

Commit 4b8f568

Browse files
committed
🛠️Still fixin' a stricter mypy...
1 parent ee97cbe commit 4b8f568

3 files changed

Lines changed: 101 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ build-backend = "hatchling.build"
1818
[dependency-groups]
1919
dev = [
2020
"mypy>=1.19.1",
21+
"numpy>=2.4.0",
22+
"numpy-typing-compat>=20251206.2.4",
2123
"pre-commit>=4.5.1",
2224
"pydocstyle>=6.3.0",
2325
"pytest>=9.0.2",

src/bseqgen/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
from collections.abc import Iterator, Sequence
77
from enum import StrEnum
88
from itertools import groupby
9-
from typing import TYPE_CHECKING, Any, Literal, Self
9+
from typing import TYPE_CHECKING, Any, Literal, Self, TypeAlias
1010

1111
__all__ = ("Direction", "BinarySequence")
1212

1313

1414
if TYPE_CHECKING:
1515
import numpy as np
16+
from numpy.typing import NDArray
1617

17-
NpNDArrayInt = np.ndarray[Any, np.dtype[np.integer]]
18-
NpDTypeInt = np.dtype[np.integer]
18+
NpNDArrayInt: TypeAlias = NDArray[np.integer[Any]]
19+
NpDTypeInt: TypeAlias = np.dtype[np.integer[Any]]
1920

2021

2122
class Direction(StrEnum):

0 commit comments

Comments
 (0)