File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -965,9 +965,10 @@ def evolve_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
965965 inst_type = get_proper_type (inst_type )
966966 if isinstance (inst_type , AnyType ):
967967 return ctx .default_signature # evolve(Any, ....) -> Any
968- # We stringify it first, so that TypeVars maintain their name.
969968 inst_type_str = format_type_bare (inst_type )
970- attrs_type = inst_type .upper_bound if isinstance (inst_type , TypeVarType ) else inst_type
969+ attrs_type = get_proper_type (
970+ inst_type .upper_bound if isinstance (inst_type , TypeVarType ) else inst_type
971+ )
971972 attrs_init_type = None
972973 if isinstance (attrs_type , Instance ):
973974 attrs_init_type = _get_attrs_init_type (attrs_type )
@@ -979,6 +980,7 @@ def evolve_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
979980 ctx .context ,
980981 )
981982 return ctx .default_signature
983+ assert isinstance (attrs_type , Instance )
982984
983985 attrs_init_type = expand_type_by_instance (attrs_init_type , attrs_type )
984986
You can’t perform that action at this time.
0 commit comments