Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby committed Jul 22, 2024
1 parent 39565a1 commit 0c694e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onnxscript/rewriter/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _to_attr_pattern(value: AttrPattern | ValuePattern | SupportedAttrTypes) ->
"""Represents promotion of values allowed as keyword-arguments in a pattern-builder call to an AttrPattern."""
if isinstance(value, AttrPattern):
return value
if type(value) == ValuePattern:
if type(value) is ValuePattern:
# This is a hack. Currently, when we create pattern-variables, we create them as ValuePattern,
# and change them to AttrPattern if/when used in an attribute context. We could use type
# annotations to distinguish between ValuePattern and AttrPattern, but forces users to
Expand Down
2 changes: 1 addition & 1 deletion onnxscript/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def assert_onnx_proto_equal(
a: The first ONNX proto.
b: The second ONNX proto.
"""
assert type(a) == type(b), f"Type not equal: {type(a)} != {type(b)}" # pylint: disable=unidiomatic-typecheck
assert type(a) is type(b), f"Type not equal: {type(a)} != {type(b)}"

a_fields = {field.name: value for field, value in a.ListFields()}
b_fields = {field.name: value for field, value in b.ListFields()}
Expand Down

0 comments on commit 0c694e9

Please sign in to comment.