8000 Fix 3903: untyped defs on derived classes by gantsevdenis · Pull Request #7548 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix 3903: untyped defs on derived classes #7548

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
wants to merge 10 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
8000 Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
py35 style types
  • Loading branch information
gantsevdenis committed Oct 8, 2019
commit 1c908a7fd89b31bcdedeae2acda1cce4de7746cc
2 changes: 1 addition & 1 deletion mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def inherit_signature(self, cls_info: TypeInfo, func: FuncDef) -> None:
if isinstance(parent.type.ret_type, UnboundType):
assert isinstance(func.type.ret_type, UnboundType)
vals = cast(Iterable[Instance], base_0.args) # type: Iterable[Instance]
names_to_types: Mapping[str, Instance] = dict(zip(base_1.type_vars, vals))
names_to_types = dict(zip(base_1.type_vars, vals)) # type: Mapping[str, Instance]
func.type.ret_type = substitute_unbounds(func.type.ret_type, names_to_types)
else:
func.type.ret_type = parent.type.ret_type
Expand Down
0