Type is not narrowed in walrus conditional #474
Labels
addressed in next version
Issue is fixed and will appear in next published version
enhancement request
New feature or request
Describe the bug
This is another issue that was raised on the mypy tracker that also affects Pyright. Conditionals of assignment expressions are not narrowed for type, producing errors like this one:
To Reproduce
Type check the snippet below.
Expected behavior
That
a
would not beNone
under thebad
conditional.Screenshots or Code
VS Code extension or command-line
extension, 1.1.17
Additional context
See python/mypy#7316.
The text was updated successfully, but these errors were encountered: