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.
MessageBuilder.incompatible_argument
1 parent 053c054 commit 88d5aacCopy full SHA for 88d5aac
mypy/messages.py
@@ -808,10 +808,10 @@ def incompatible_argument(
808
)
809
arg_label = f'"{arg_name}"'
810
if isinstance(outer_context, IndexExpr) and isinstance(
811
- outer_context.index, StrExpr
+ index := constant_fold_expr(outer_context.index, "unused"), str
812
):
813
msg = 'Value of "{}" has incompatible type {}; expected {}'.format(
814
- outer_context.index.value,
+ index,
815
quote_type_string(arg_type_str),
816
quote_type_string(expected_type_str),
817
0 commit comments