Skip to content

Commit

Permalink
Sync with python#4072 for realz
Browse files Browse the repository at this point in the history
  • Loading branch information
ilevkivskyi committed Oct 8, 2017
1 parent 80c1b38 commit 2a96e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@ def builtin_item_type(tp: Type) -> Optional[Type]:
return tp.args[0]
elif isinstance(tp, TupleType) and all(not isinstance(it, AnyType) for it in tp.items):
return join_type_list(tp.items)
elif isinstance(tp, TypedDictType) and tp.fallback.type.fullname() == 'typing.Mapping':
elif isinstance(tp, TypedDictType):
# TypedDict always has non-optional string keys.
if tp.fallback.type.fullname() == 'typing.Mapping':
return tp.fallback.args[0]
Expand Down

0 comments on commit 2a96e50

Please sign in to comment.