-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wronggood-first-issuetopic-error-reportingHow we report errorsHow we report errorstopic-usability
Description
Currently, mypy adds a * in reveal_type() output when a type is inferred rather than explicit. This has a couple of problems:
- I'm not sure what it's useful for. It might be nice to be able to understand how mypy arrived at a type, but it's not obvious to most users what it means for a type to be "inferred" and I personally have never found the distinction useful.
- It periodically confuses users who see it and don't know what it means (e.g., very recently in a typing-sig thread about missing TypedDict fields)
- PEP 646 is set to introduce a new meaning for
*related to typing, which will make mypy's usage here even more confusing.
I propose that we simply drop the * from reveal_type output, but I'm happy to be convinced otherwise if there are good reasons to keep it.
Looks like the logic for adding the * is in https://github.com/python/mypy/blob/master/mypy/types.py#L2079.
Akuli, brendon-boldt and AlexWaygood
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wronggood-first-issuetopic-error-reportingHow we report errorsHow we report errorstopic-usability