Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete a ProperType join hack #15461

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions mypy/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
Parameters,
ParamSpecType,
PartialType,
PlaceholderType,
ProperType,
TupleType,
Type,
Expand Down Expand Up @@ -246,14 +245,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)

Expand Down