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
def test(param: Optional[int]) -> List[str]:
ret = None # Revealed type is 'None'
if param is not None:
ret = []
ret.append('') # Revealed type is 'builtins.list[builtins.str]'
return ret
does not raise any errors, which looks like a bug since the return value is not necessarily a List[str] -- tested with mypy 0.750, Python 3.7.
mypy.ini:
no_implicit_optional = True
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
The following code
does not raise any errors, which looks like a bug since the return value is not necessarily a
List[str]
-- tested with mypy 0.750, Python 3.7.mypy.ini:
The text was updated successfully, but these errors were encountered: