@erictraut has gathered a long list of problems caused by mypy's behavior of using the "join" operator to unify types in various contexts. - #12053 - #12009 - #11934 - #11440 - #11618 - #10740 - #10442 - #7884 - #7835 - #7616 - #6968 - #6079 - #5512 - #5128 - #4134 - #3339 I believe that we should change this behavior. If someone opens a PR to do this, it would be interesting to see what the results look like in mypy-primer and mypy's CI.
@erictraut has gathered a long list of problems caused by mypy's behavior of using the "join" operator to unify types in various contexts.
A | B | Nonebecomesobjectafter narrowing checks #12009objectnot a union #11440I believe that we should change this behavior.
If someone opens a PR to do this, it would be interesting to see what the results look like in mypy-primer and mypy's CI.