Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added unconditional note for incompatible argument type
  • Loading branch information
jublizoo committed Apr 26, 2024
commit 806184f3ae2cf19443d72321a48d7b116e4ac913
2 changes: 2 additions & 0 deletions mypy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,8 @@ def incompatible_argument(
quote_type_string(arg_type_str),
quote_type_string(expected_type_str),
)
note_msg = 'Consider using a TypedDict type or "Dict[str, any]" for the ** argument'
notes.append(note_msg)
expected_type = get_proper_type(expected_type)
if isinstance(expected_type, UnionType):
expected_types = list(expected_type.items)
Expand Down