From ea155b279ff4484cc6d39ecd0124b63ba0cb4b95 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Mon, 19 Jun 2023 00:04:11 +0100 Subject: [PATCH 1/2] Delete a ProperType join hack --- mypy/join.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mypy/join.py b/mypy/join.py index 62d256f4440f..b80329792c96 100644 --- a/mypy/join.py +++ b/mypy/join.py @@ -246,14 +246,6 @@ def join_types(s: Type, t: Type, instance_joiner: InstanceJoiner | None = None) if isinstance(s, UninhabitedType) and not isinstance(t, UninhabitedType): s, t = t, s - # We shouldn't run into PlaceholderTypes here, but in practice we can encounter them - # here in the presence of undefined names - if isinstance(t, PlaceholderType) and not isinstance(s, PlaceholderType): - # mypyc does not allow switching the values like above. - return s.accept(TypeJoinVisitor(t)) - elif isinstance(t, PlaceholderType): - return AnyType(TypeOfAny.from_error) - # Meets/joins require callable type normalization. s, t = normalize_callables(s, t) From 4f34cf802dcb8976ef43ab69e5cdf6cc60f3ba56 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Mon, 19 Jun 2023 00:08:29 +0100 Subject: [PATCH 2/2] Delete unused import --- mypy/join.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mypy/join.py b/mypy/join.py index b80329792c96..f4af59f4e50b 100644 --- a/mypy/join.py +++ b/mypy/join.py @@ -29,7 +29,6 @@ Parameters, ParamSpecType, PartialType, - PlaceholderType, ProperType, TupleType, Type,