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
% cat ~/Desktop/walrus.py
from typing_extensions import assert_type
def f() -> int:
return 3
def g(cond: bool) -> None:
if cond and (x := f()):
assert_type(x, int)
% python -m pyanalyze ~/Desktop/walrus.py -e possibly_undefined_name
x may be used uninitialized (code: possibly_undefined_name)
In /Users/jelle/Desktop/walrus.py at line 10
7:
8: def g(cond: bool) -> None:
9: if cond and (x := f()):
10: assert_type(x, int)
^
Type is Union[Any[error], int] (expected int) (code: inference_failure)
In /Users/jelle/Desktop/walrus.py at line 10
7:
8: def g(cond: bool) -> None:
9: if cond and (x := f()):
10: assert_type(x, int)
^
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: