-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-type-contextType context / bidirectional inferenceType context / bidirectional inference
Description
Bug Report
Type check is ignored on keys and values of a dictionary when declared in a specific way.
To Reproduce
Mypy detects the error whenever Util.constructor or Util.apply is not used. But if both are used the calls to f used on the keys or values are not type checked.
Expected Behavior
error: Argument 1 has incompatible type "str"; expected "int" [arg-type] at the calls of f
Actual Behavior
Mypy does not throw arg-type errors
Your Environment
checkout playground example
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-type-contextType context / bidirectional inferenceType context / bidirectional inference