Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam committed Aug 2, 2024
1 parent 212d723 commit efb99ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxscript/rewriter/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ def extend(self, other: MatchResult | bool):


@contextlib.contextmanager
def pattern_builder(rewriter_context: RewriterContext):
def pattern_builder(builder: OpsetPatternBuilder):
global _pattern_builder
prev_builder = _pattern_builder
_pattern_builder = rewriter_context
_pattern_builder = builder
yield
_pattern_builder = prev_builder

Expand Down Expand Up @@ -552,7 +552,7 @@ def matches(self, node: ir.Node, match: MatchResult) -> MatchResult:
return match

def clone(self, node_map: dict[NodePattern, NodePattern], swap: bool) -> NodePattern:
inputs = [v.clone(node_map) for v in self.inputs]
inputs = [(v.clone(node_map) if v is not None else None) for v in self.inputs]
if swap:
assert (
len(inputs) == 2
Expand Down

0 comments on commit efb99ea

Please sign in to comment.