File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1818from mypy .checker_shared import ExpressionCheckerSharedApi
1919from mypy .checkmember import analyze_member_access , has_operator
2020from mypy .checkstrformat import StringFormatterChecker
21+ from mypy .constant_fold import constant_fold_expr
2122from mypy .erasetype import erase_type , remove_instance_last_known_values , replace_meta_vars
2223from mypy .errors import ErrorInfo , ErrorWatcher , report_internal_error
2324from mypy .expandtype import (
@@ -659,7 +660,7 @@ def check_str_format_call(self, e: CallExpr) -> None:
659660 """More precise type checking for str.format() calls on literals."""
660661 assert isinstance (e .callee , MemberExpr )
661662 format_value = None
662- folded_callee_expr = constant_fold_expr (e .callee .expr , "unused" )
663+ folded_callee_expr = constant_fold_expr (e .callee .expr , "< unused> " )
663664 if isinstance (folded_callee_expr , str ):
664665 format_value = folded_callee_expr
665666 elif self .chk .has_type (e .callee .expr ):
You can’t perform that action at this time.
0 commit comments