Incorrect "possibly undefined name" with walrus operator
Incorrect "possibly undefined name" with walrus operator: a task in swe-rebench-v2.1-rl-isolated-1k: SWE-rebench V2.1 RL, isolated grading (1k subset) (Harbor dataset). def g(cond: bool) - None: if cond and (x := f()): assert type(x, int) % python -m pyanalyze ~/Desktop/walrus.py -e possibly…
The task
def g(cond: bool) -> None: if cond and (x := f()): assert_type(x, int) % python -m pyanalyze ~/Desktop/walrus.py -e possibly_undefined_name