We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a64f2e4 commit f6f98e4Copy full SHA for f6f98e4
mypyc/irbuild/for_helpers.py
@@ -1225,7 +1225,11 @@ def get_expr_length(expr: Expression) -> int | None:
1225
arg_lengths = [get_expr_length(arg) for arg in expr.args]
1226
if all(arg is not None for arg in arg_lengths):
1227
return min(arg_lengths) # type: ignore [type-var]
1228
- elif fullname == "builtins.range" and len(expr.args) <= 3 and all(isinstance(arg, IntExpr) for arg in expr.args):
+ elif (
1229
+ fullname == "builtins.range"
1230
+ and len(expr.args) <= 3
1231
+ and all(isinstance(arg, IntExpr) for arg in expr.args)
1232
+ ):
1233
return len(range(*(arg.value for arg in expr.args))) # type: ignore [attr-defined]
1234
1235
# TODO: extend this, passing length of listcomp and genexp should have worthwhile
0 commit comments