8000 Do not ignore generic type args when checking multiple inheritance compatibility by sterliakov · Pull Request #18270 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Do not ignore generic type args when checking multiple inheritance compatibility #18270

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
Sort for fixed messages order
  • Loading branch information
sterliakov committed Dec 9, 2024
commit 1960ad9214053a260564c95f3f77b7a3808ac293
3 changes: 2 additions & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2750,7 +2750,8 @@ def check_multiple_inheritance(self, typ: TypeInfo) -> None:
for i, base in enumerate(bases):
# Attributes defined in both the type and base are skipped.
# Normal checks for attribute compatibility should catch any problems elsewhere.
non_overridden_attrs = all_names[i] - typ.names.keys()
# Sort for consistent messages order.
non_overridden_attrs = sorted(all_names[i] - typ.names.keys())
for name in non_overridden_attrs:
if is_private(name):
continue
Expand Down
Loading
0