Skip to content

Commit 09a5d05

Browse files
committed
broaden ExpressionConvertible scope
1 parent 8cb731a commit 09a5d05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

oqpy/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def expr_matches(a: Any, b: Any) -> bool:
338338
class ExpressionConvertible(Protocol):
339339
"""This is the protocol an object can implement in order to be usable as an expression."""
340340

341-
def _to_oqpy_expression(self) -> HasToAst:
341+
def _to_oqpy_expression(self) -> AstConvertible:
342342
... # pragma: no cover
343343

344344

@@ -355,7 +355,7 @@ class CachedExpressionConvertible(Protocol):
355355

356356
_oqpy_cache_key: Hashable
357357

358-
def _to_cached_oqpy_expression(self) -> HasToAst:
358+
def _to_cached_oqpy_expression(self) -> AstConvertible:
359359
... # pragma: no cover
360360

361361

0 commit comments

Comments
 (0)