Skip to content

Commit e957e18

Browse files
committed
Fix lint issues
Signed-off-by: G Ramalingam <grama@microsoft.com>
1 parent 87b338c commit e957e18

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

onnxscript/_internal/builder_test.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,24 +541,23 @@ def test_int_literal_no_clash_across_typed_and_untyped_contexts(self):
541541
_ = op.Add(x, 1)
542542

543543
# Both ops should share the same initializer (same ir.Value object)
544-
gather_node = list(graph)[0]
545-
add_node = list(graph)[1]
544+
gather_node = graph.node(0)
545+
add_node = graph.node(1)
546546
self.assertIs(gather_node.inputs[1], add_node.inputs[1])
547547
self.assertEqual(gather_node.inputs[1].name, "const_1_i64")
548548

549549
def test_int_list_no_clash_across_typed_and_untyped_contexts(self):
550550
"""Test that the same int list used in typed and untyped positions
551-
does not cause an initializer name collision (sequence variant)."""
551+
does not cause an initializer name collision (sequence variant).
552+
"""
552553
graph = ir.Graph(
553554
name="test_model",
554555
inputs=[],
555556
outputs=[],
556557
nodes=[],
557558
opset_imports={"": _default_opset_version},
558559
)
559-
x = ir.Value(
560-
name="x", type=ir.TensorType(ir.DataType.INT64), shape=ir.Shape([2, 3])
561-
)
560+
x = ir.Value(name="x", type=ir.TensorType(ir.DataType.INT64), shape=ir.Shape([2, 3]))
562561
graph.inputs.append(x)
563562

564563
graph_builder = builder.GraphBuilder(graph)

0 commit comments

Comments
 (0)