Feature
I wish mypy is recognized list of constant values as a list of literal types.
Pitch
There are example code.
from typing import Literal, Dict
values: Dict[Literal["from", "to", "cc"], str] = {}
# key should be recognized Literal["from","to", "cc"] instead of str
for key in ["from", "to", "cc"]:
values[key] = key # Now, this line will be error in order to recognize key as a str.