Skip to content

Commit 996c4d6

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

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
@@ -1554,10 +1554,10 @@ def compare_strings(self, lhs: Value, rhs: Value, op: str, line: int) -> Value:
15541554
"""Compare two strings"""
15551555
if op == "==":
15561556
# We can specialize this case if one or both values are string literals
1557-
1557+
15581558
def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15591559
return isinstance(value, LoadLiteral) and is_str_rprimitive(value.type)
1560-
1560+
15611561
if is_string_literal(lhs):
15621562
if is_string_literal(rhs):
15631563
# we can optimize out the check entirely in some constant-folded cases
@@ -1568,7 +1568,7 @@ def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15681568
literal_length = Integer(len(rhs.value), c_pyssize_t_rprimitive, line) # type: ignore [arg-type]
15691569
return self.primitive_op(str_eq_literal, [lhs, rhs, literal_length], line)
15701570
return self.primitive_op(str_eq, [lhs, rhs], line)
1571-
1571+
15721572
elif op == "!=":
15731573
# perform a standard equality check, then negate
15741574
eq = compare_strings(lhs, rhs, "==", line)

0 commit comments

Comments
 (0)