Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pass
List[int]
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mypy 0.650
Take the following source:
from typing import List def foo(x: int) -> List[int]: pass print(foo(3)[0])
Lint with mypy --strict test.py - nothing reported. During runtime:
mypy --strict test.py
Traceback (most recent call last): File "test.py", line 6, in <module> print(foo(3)[0]) TypeError: 'NoneType' object is not subscriptable
return None instead of pass raises an error, though.
return None
The text was updated successfully, but these errors were encountered:
This is a duplicate of #2350
Sorry, something went wrong.
No branches or pull requests
mypy 0.650
Take the following source:
Lint with
mypy --strict test.py
- nothing reported.During runtime:
return None
instead ofpass
raises an error, though.The text was updated successfully, but these errors were encountered: