8000 Fix type argument inference for overloaded functions with explicit self types (Fixes #14943). by tyralla · Pull Request #14975 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix type argument inference for overloaded functions with explicit self types (Fixes #14943). #14975

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

Closed
Prev Previous commit
Next Next commit
ignore_type_vars=False for testing
  • Loading branch information
tyralla committed Apr 15, 2023
commit 6e5476a9a4eb71c75361164c2c15d177b34f5b1a
2 changes: 1 addition & 1 deletion mypy/typeops.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class B(A): pass
for mi in method.items:
selftype = get_proper_type(mi.arg_types[0])
if not isinstance(selftype, Instance) or is_subtype(
origtype, selftype, ignore_type_vars=True
origtype, selftype, ignore_type_vars=False
):
methoditems.append(mi)
if len(methoditems) == 0:
Expand Down
0