Skip to content

Commit 6a6e6f7

Browse files
gramalingamCopilot
andcommitted
Fix mutable class default lint warning in mha_scale_test
Use tuples instead of lists for class-level _3D and _OUT constants. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d68e0d0 commit 6a6e6f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onnxscript/rewriter/ort_fusions/mha_scale_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def _get_mha_node(self, model: ir.Model) -> ir.Node | None:
8383
return node
8484
return None
8585

86-
_3D = [FLOAT["B", "S", _D]] * 3
87-
_OUT = [FLOAT["B", "S", _D]]
86+
_3D = (FLOAT["B", "S", _D],) * 3
87+
_OUT = (FLOAT["B", "S", _D],)
8888

8989
def _check_numerical_equivalence(self, model: ir.Model, inputs: dict, expected_count: int):
9090
original_output = test_utils.ort_run("Original", model, inputs)

0 commit comments

Comments
 (0)