Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam committed Nov 14, 2024
1 parent 6b4d329 commit a05c635
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion onnxscript/optimizer/_inliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def _instantiate_call(self, node: ir.Node, call_site_id: CallSiteId) -> NodeRepl
# Identify call-stack for node, used to generate unique names.
call_stack = self.node_context.get(node, [])

cloner = _CopyReplace(self, attributes, value_map, node.metadata_props, call_stack + [call_site_id])
cloner = _CopyReplace(
self, attributes, value_map, node.metadata_props, call_stack + [call_site_id]

Check warning

Code scanning / lintrunner

RUFF/RUF005 Warning

Consider [\*call\_stack, call\_site\_id] instead of concatenation.
See https://docs.astral.sh/ruff/rules/collection-literal-concatenation
)

# iterate over the nodes in the function, creating a copy of each node
# and replacing inputs with the corresponding values in the value map.
Expand Down
1 change: 0 additions & 1 deletion onnxscript/rewriter/collapse_slices.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def _check_if_redundant_slice(
logger.info("The value 'step' is not a scalar.")
return False


if steps_const.numpy().item() != 1:
logger.info("The value 'step' is not 1.")
return False
Expand Down

0 comments on commit a05c635

Please sign in to comment.