Skip to content

Commit

Permalink
Depend on useful-types only when type-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 13, 2024
1 parent ce1b948 commit bf81355
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pymbolic/mapper/substitutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@
THE SOFTWARE.
"""
from collections.abc import Callable
from typing import Any

from useful_types import SupportsGetItem, SupportsItems
from typing import TYPE_CHECKING, Any

from pymbolic.mapper import CachedIdentityMapper, IdentityMapper
from pymbolic.primitives import AlgebraicLeaf
from pymbolic.typing import ExpressionT


if TYPE_CHECKING:
from useful_types import SupportsGetItem, SupportsItems


class SubstitutionMapper(IdentityMapper[[]]):
def __init__(
self, subst_func: Callable[[AlgebraicLeaf], ExpressionT | None]
Expand Down

0 comments on commit bf81355

Please sign in to comment.