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

Allow None vs TypeVar overlap for overloads #15846

Merged
merged 6 commits into from
Aug 14, 2023
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
@@ -2503,7 +2503,8 @@ def check_overload_call(
callable_name=callable_name,
object_type=object_type,
)
if union_interrupted:
# Do not show the extra error is the union math was forced.
if union_interrupted and not none_type_var_overlap:
self.chk.fail(message_registry.TOO_MANY_UNION_COMBINATIONS, context)
return result