Skip to content
Merged
Changes from all commits
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
9 changes: 5 additions & 4 deletions trio_typing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,11 @@ def start_soon(
+ ([None] * len(type_var_types))
+ callable_ty.arg_names[callable_args_idx + 1 :]
),
variables=(
list(callable_ty.variables)
+ cast(List[TypeVarLikeType], type_var_types)
),
# Note that we do *not* append `type_var_types` to
# `callable_ty.variables`. Even though `*type_var_types` are in our new
# `callable_ty`'s argument types, they are *not* type variables that get
# bound when our new `callable_ty` gets called. They get bound when the
# `expanded_fn` that references our new `callable_ty` gets called.
Comment on lines -466 to +470
Copy link
Copy Markdown
Member

@belm0 belm0 Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this fix, in turn, cause errors from older mypy?

)
expanded_fns.append(
fn_type.copy_modified(
Expand Down