提交 feaa2822 authored 作者: pre-commit-ci[bot]'s avatar pre-commit-ci[bot] 提交者: Thomas Wiecki

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
上级 3f692cd8
......@@ -266,7 +266,7 @@ class Apply(Node, Generic[OpType]):
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
......@@ -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]
......
......@@ -1577,7 +1577,7 @@ class PatternNodeRewriter(NodeRewriter):
"""
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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论