Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and twiecki committed May 27, 2024
1 parent 3f692cd commit feaa282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pytensor/graph/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def clone_with_new_inputs(

assert isinstance(inputs, list | tuple)
remake_node = False
new_inputs: list["Variable"] = list(inputs)
new_inputs: list[Variable] = list(inputs)

# Some Ops like Alloc require the node to always be rebuilt in non-strict mode
# as the output type depends on the input values and not just their types
Expand Down Expand Up @@ -1272,7 +1272,7 @@ def clone_node_and_cache(
return None

# Use a cached `Op` clone when available
new_op: "Op" | None = cast(Optional["Op"], clone_d.get(node.op))
new_op: Op | None = cast(Optional["Op"], clone_d.get(node.op))

cloned_inputs: list[Variable] = [cast(Variable, clone_d[i]) for i in node.inputs]

Expand Down
2 changes: 1 addition & 1 deletion pytensor/graph/rewriting/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ def __init__(
"""
from pytensor.graph.rewriting.unify import convert_strs_to_vars

var_map: dict[str, "Var"] = {}
var_map: dict[str, Var] = {}
self.in_pattern = convert_strs_to_vars(in_pattern, var_map=var_map)
self.out_pattern = convert_strs_to_vars(out_pattern, var_map=var_map)
self.values_eq_approx = values_eq_approx
Expand Down

0 comments on commit feaa282

Please sign in to comment.