Skip to content

Commit e5dba39

Browse files
committed
basedpyright: add a cast.
1 parent e4a8750 commit e5dba39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

loopy/type_inference.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ def _map_int_div_modulo(self, expr: p.FloorDiv | p.Remainder):
449449
else expr.denominator
450450
)
451451
denom = (
452-
denom + 1 if is_integer(denom) and denom == 0 else denom
452+
cast("int | np.integer", denom + 1)
453+
if is_integer(denom) and denom == 0
454+
else denom
453455
) # avoid divide by zero.
454456

455457
if is_integer(num) and is_integer(denom):

0 commit comments

Comments
 (0)