8000 Improvements to functools.partial of types by hauntsaninja · Pull Request #17898 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Improvements to functools.partial of types #17898

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

Merged
merged 3 commits into from
Oct 9, 2024
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
Prev Previous commit
proper
  • Loading branch information
hauntsaninja committed Oct 8, 2024
commit d03b830876f2c80836ad7030a5637c3683eb7fbe
4 changes: 3 additions & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,9 @@ def extract_callable_type(self, inner_type: Type | None, ctx: Context) -> Callab
if isinstance(inner_type, TypeVarLikeType):
inner_type = get_proper_type(inner_type.upper_bound)
if isinstance(inner_type, TypeType):
inner_type = self.expr_checker.analyze_type_type_callee(inner_type.item, ctx)
inner_type = get_proper_type(
self.expr_checker.analyze_type_type_callee(inner_type.item, ctx)
)

if isinstance(inner_type, CallableType):
outer_type = inner_type
Expand Down
Loading
0