File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -123,14 +123,16 @@ class AttrConstantPattern(AttrPattern):
123123
124124 def __init__ (self , value : SupportedAttrTypes ):
125125 super ().__init__ (None )
126- if isinstance (value , Sequence ):
127- value = tuple (value )
128126 self ._value = value
129127
130128 def matches (self , attr : ir .Attr ) -> bool :
131- if attr .type in {ir .AttributeType .INTS , ir .AttributeType .FLOATS , ir .AttributeType .STRINGS }:
129+ if attr .type in {
130+ ir .AttributeType .INTS ,
131+ ir .AttributeType .FLOATS ,
132+ ir .AttributeType .STRINGS ,
133+ }:
132134 # Since the type of attr.value is Sequence, we need to convert to the same type for comparison.
133- return tuple (attr .value ) == self ._value
135+ return tuple (attr .value ) == tuple ( self ._value )
134136 return attr .value == self ._value
135137
136138 def __str__ (self ) -> str :
You can’t perform that action at this time.
0 commit comments