diff --git a/noxfile.py b/noxfile.py index 0e7a0f4..ef7cec7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -21,7 +21,7 @@ def test(session: nox.Session) -> None: if path is not None: pytest_args = ("--import-mode=importlib", "--pyargs", "bmipy", "tests") - session.install("coverage", "pytest", "numpy") + session.install("coverage", "pytest") session.run("coverage", "erase") session.run( diff --git a/pyproject.toml b/pyproject.toml index a24bf20..71b796d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,6 @@ dynamic = [ dev = ["nox"] testing = [ "coverage", - "numpy", "pytest", ] diff --git a/src/bmipy/_template.py b/src/bmipy/_template.py index ff6d721..d5ddce0 100644 --- a/src/bmipy/_template.py +++ b/src/bmipy/_template.py @@ -41,9 +41,11 @@ def render(self, with_docstring: bool = True) -> str: from __future__ import annotations from typing import Any +from typing import TYPE_CHECKING -import numpy as np -from numpy.typing import NDArray +if TYPE_CHECKING: + import numpy as np + from numpy.typing import NDArray from bmipy.bmi import Bmi