Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depend on useful-types only when type-checking #161

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading