Skip to content

Commit f22d8ac

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4054151 commit f22d8ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypyc/irbuild/ll_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,18 +1563,18 @@ def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15631563
if is_string_literal(rhs):
15641564
# we can optimize out the check entirely in some constant-folded cases
15651565
return self.true() if lhs.value == rhs.value else self.false()
1566-
1566+
15671567
# if lhs argument is string literal, switch sides to match specializer C api
15681568
lhs, rhs = rhs, lhs
15691569
literal_fastpath = True
15701570
elif is_string_literal(rhs):
15711571
literal_fastpath = True
1572-
1572+
15731573
if literal_fastpath:
15741574
literal_string = cast(str, cast(LoadLiteral, rhs).value)
15751575
literal_length = Integer(len(literal_string), c_pyssize_t_rprimitive, line)
15761576
return self.primitive_op(str_eq_literal, [lhs, rhs, literal_length], line)
1577-
1577+
15781578
return self.primitive_op(str_eq, [lhs, rhs], line)
15791579

15801580
elif op == "!=":

0 commit comments

Comments
 (0)