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
# mypy: enable-error-code=redundant-exprfrom __future__ importannotationsclassNode:
parent: Node|Noneis_valid: booldeftraverse_needs_fixing(self) ->Node|None:
it: Node|Noneit=selfwhileitisnotNoneandit.is_valid: # E: Left operand of "and" is always true [redundant-expr]it=it.parentreturnitdeftraverse(self) ->Node|None:
# this only works because mypy does not narrow on initial assignment# which is something we'd like to change, see #2008it: Node|None=selfwhileitisnotNoneandit.is_valid:
it=it.parentreturnit
Activity
Avoid false `unreachable` and `redundant-expr` warnings in loops.
Avoid false `unreachable` and `redundant-expr` warnings in loops. (#1…