Open serhiy-storchaka opened 2 years ago
To clarify the state here, I fixed semantic analysis to not complain about the redefinition + get checker to type check it like an assignment. This gets rid of one of the errors here. However, we still need to fix the binder to do type narrowing here.
In the following example MyPy complain about local import and does not recognize it as assignment:
Output:
It is not recognized as assignment even for global import:
Output:
mypy 0.950 (compiled: yes) Python 3.9.12