-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Labels
false-positivemypy gave an error on correct codemypy gave an error on correct codefeatureneeds discussionpriority-0-hightopic-pep-484
Description
Mapping should be covariant. See discussion at #1113.
Note that the key type is used as an argument type to __getitem__
and get
, so mypy may complain about a covariant key type variable, but we can just ignore that error in the stub, as covariance is safe in this case. Mapping
doesn't support mutation operations and __getitem__
can fail even in fully type safe code.
rmorshea, sinback, surenkov, MarcoGorelli, finite-state-machine and 2 more
Metadata
Metadata
Assignees
Labels
false-positivemypy gave an error on correct codemypy gave an error on correct codefeatureneeds discussionpriority-0-hightopic-pep-484