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
After #3024, mypy won't complain when inferring the type of a variable as None. Unfortunately, in some circumstances we drop information about the variable that makes this invalid. For example:
T=TypeVar('T')
deff(*x: T) ->Dict[int, T]: passx=Noneifbool():
x=f()
reveal_type(x) # E: Revealed type is 'builtins.None'
The text was updated successfully, but these errors were encountered:
After #3024, mypy won't complain when inferring the type of a variable as
None
. Unfortunately, in some circumstances we drop information about the variable that makes this invalid. For example:The text was updated successfully, but these errors were encountered: