Skip to content

Commit 2580b10

Browse files
Update ll_builder.py
1 parent d781dde commit 2580b10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/irbuild/ll_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import sys
1010
from collections.abc import Sequence
11-
from typing import Callable, Final, Optional
11+
from typing import Callable, Final, Optional, TypeGuard
1212

1313
from mypy.argmap import map_actuals_to_formals
1414
from mypy.nodes import ARG_POS, ARG_STAR, ARG_STAR2, ArgKind
@@ -1552,7 +1552,7 @@ def check_tagged_short_int(self, val: Value, line: int, negated: bool = False) -
15521552
def compare_strings(self, lhs: Value, rhs: Value, op: str, line: int) -> Value:
15531553
"""Compare two strings"""
15541554

1555-
def is_string_literal(value: Value) -> bool:
1555+
def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15561556
return isinstance(value, LoadLiteral) and is_str_rprimitive(value.type)
15571557

15581558
if op == "==":

0 commit comments

Comments
 (0)