We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On latest mypy; of course the code can use if not var: which would have the same effect.
if not var:
$ cat foo.py import os var = os.environ.get('ENV') if var in {None, ''}: var = 'default' else: var = var.lower()
$ mypy foo.py foo.py:7: error: Item "None" of "Optional[str]" has no attribute "lower" Found 1 error in 1 file (checked 1 source file)
$ mypy --version mypy 0.770+dev.2d06ba71aa087e8d8a6eb4a37bb9a6254f7dbb70
Thanks
The text was updated successfully, but these errors were encountered:
Hello Sir Can i fix this issue?
Sorry, something went wrong.
Hi @EkanshMangal,
I see there is a Contributing file on this repository I would suggest starting there for instructions.
Closing as a duplicate of #10977, which is a newer issue but has a lot more discussion attached to it.
No branches or pull requests
On latest mypy; of course the code can use
if not var:
which would have the same effect.Thanks
The text was updated successfully, but these errors were encountered: