pyright doc say “The type inference of an assignment statement normally proceeds from RHS to LHS“ as shown below:
This technique is called “bidirectional inference” because type inference for an assignment normally proceeds by first determining the type of the right-hand side (RHS) of the assignment, which then informs the type of the left-hand side (LHS) of the assignment. With bidirectional inference, if the LHS of an assignment has a declared type, it can influence the inferred type of the RHS.
Now in mypy, does the type inference of an assignment statement also normally proceed from RHS to LHS same as pyright? because mypy doc doesn’t explain it.