Skip to content

Commit

Permalink
make PlaceholderSubstitutor explicit about not supporting functions
Browse files Browse the repository at this point in the history
  • Loading branch information
majosm committed Jan 13, 2025
1 parent 4e9a4d0 commit d3671b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytato/transform/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ class PlaceholderSubstitutor(CopyMapper):
"""

def __init__(self, substitutions: Mapping[str, Array]) -> None:
# Ignoring function cache, not needed
# Ignoring function cache, since we don't support functions anyway
super().__init__()
self.substitutions = substitutions

def map_placeholder(self, expr: Placeholder) -> Array:
return self.substitutions[expr.name]

def map_named_call_result(self, expr: NamedCallResult) -> NamedCallResult:
raise NotImplementedError(
"PlaceholderSubstitutor does not support functions.")


class Inliner(CopyMapper):
"""
Expand Down

0 comments on commit d3671b4

Please sign in to comment.