Skip to content

Commit a288401

Browse files
committed
fix type errs
1 parent 79ffa84 commit a288401

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mypy/constant_fold.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from __future__ import annotations
77

8-
from typing import Final, Union
8+
from typing import Any, Callable, Final, Union
99

1010
from mypy.nodes import (
1111
ArgKind,
@@ -216,7 +216,11 @@ def constant_fold_unary_op(op: str, value: ConstantValue) -> int | float | None:
216216
"builtins.chr": chr,
217217
}
218218

219-
def constant_fold_call_expr(expr: CallExpr, cur_mod_id: str, foldable_builtins=foldable_builtins) -> ConstantValue | None:
219+
def constant_fold_call_expr(
220+
expr: CallExpr,
221+
cur_mod_id: str,
222+
foldable_builtins: dict[str, Callable[..., Any]] = foldable_builtins,
223+
) -> ConstantValue | None:
220224
callee = expr.callee
221225
if isinstance(callee, NameExpr):
222226
func = foldable_builtins.get(callee.fullname)

0 commit comments

Comments
 (0)