You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 07b0d80
Browse filesBrowse the repository at this point in the historyBrowse files
Adjust error handling for literals in NewType and TypeVars
This commit modifies mypy so that the caller of TypeAnalyzer can
optionally suppress "Invalid type" related error messages.
This resolvespython#5989: mypy will
now stop recommending using Literal[...] when doing
`A = NewType('A', 4)` or `T = TypeVar('T', bound=4)`.
(The former suggestion is a bad one: you can't create a NewType of a
Literal[...] type. The latter suggestion is a valid but stupid one:
`T = TypeVar('T', bound=Literal[4])` is basically the same thing as
doing just `T = Literal[4].
0 commit comments