Skip to content

Commit 9476471

Browse files
Update for_helpers.py
1 parent be36b77 commit 9476471

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ def check_type(obj: Any, typ: type[ForGenerator]) -> bool:
12181218
and (
12191219
for_seq := cast(ForSequence, g.main_gen if isinstance(g, ForEnumerate) else g)
12201220
).reverse
1221-
and for_seq.len_reg is not None
1221+
and for_seq.length_reg is not None
12221222
]
12231223
for_sequence_reverse_no_len_check = [
12241224
g
@@ -1227,7 +1227,7 @@ def check_type(obj: Any, typ: type[ForGenerator]) -> bool:
12271227
and (
12281228
for_seq := cast(ForSequence, g.main_gen if isinstance(g, ForEnumerate) else g)
12291229
).reverse
1230-
and for_seq.len_reg is None
1230+
and for_seq.length_reg is None
12311231
]
12321232
for_sequence_forward_with_len_check = [
12331233
g
@@ -1236,7 +1236,7 @@ def check_type(obj: Any, typ: type[ForGenerator]) -> bool:
12361236
and not (
12371237
for_seq := cast(ForSequence, g.main_gen if isinstance(g, ForEnumerate) else g)
12381238
).reverse
1239-
and for_seq.len_reg is not None
1239+
and for_seq.length_reg is not None
12401240
]
12411241
for_sequence_forward_no_len_check = [
12421242
g
@@ -1245,7 +1245,7 @@ def check_type(obj: Any, typ: type[ForGenerator]) -> bool:
12451245
and not (
12461246
for_seq := cast(ForSequence, g.main_gen if isinstance(g, ForEnumerate) else g)
12471247
).reverse
1248-
and for_seq.len_reg is None
1248+
and for_seq.length_reg is None
12491249
]
12501250

12511251
# these are really fast, just a C int equality check

0 commit comments

Comments
 (0)