Skip to content

Commit 138568a

Browse files
Copilotjustinchuby
andcommitted
Run lintrunner f to format code
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
1 parent 1902c59 commit 138568a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

onnxscript/rewriter/redundant_scatter_nd.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def check(self, context, data, axis, transposed_data, **_):
4747
updated_dim_value = shape[axis_value]
4848
transposed_data_shape: ir.Shape | None = transposed_data.shape
4949
if transposed_data_shape is None:
50-
return result.fail("Transposed data shape is not statically known.", transposed_data)
50+
return result.fail(
51+
"Transposed data shape is not statically known.", transposed_data
52+
)
5153
actual_dim_value = transposed_data_shape[0]
5254
if updated_dim_value != actual_dim_value:
5355
# The first dimension of the transposed data does not match the updated dimension,
@@ -83,7 +85,9 @@ def check(self, context, data, indices, updates, **_):
8385
if updates.shape is None:
8486
return result.fail("The value 'updates' shape is not statically known.", updates)
8587
if data.shape != updates.shape:
86-
return result.fail("The shape of 'data' and 'updates' are different.", [data, updates])
88+
return result.fail(
89+
"The shape of 'data' and 'updates' are different.", [data, updates]
90+
)
8791

8892
# 2. the indices is referring to the whole data, which is from 0 to data.shape[0]
8993
if indices.const_value is None:

0 commit comments

Comments
 (0)