File tree 1 file changed +4
-2
lines changed
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
965
965
inst_type = get_proper_type (inst_type )
966
966
if isinstance (inst_type , AnyType ):
967
967
return ctx .default_signature # evolve(Any, ....) -> Any
968
- # We stringify it first, so that TypeVars maintain their name.
969
968
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
+ )
971
972
attrs_init_type = None
972
973
if isinstance (attrs_type , Instance ):
973
974
attrs_init_type = _get_attrs_init_type (attrs_type )
@@ -979,6 +980,7 @@ def evolve_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
979
980
ctx .context ,
980
981
)
981
982
return ctx .default_signature
983
+ assert isinstance (attrs_type , Instance )
982
984
983
985
attrs_init_type = expand_type_by_instance (attrs_init_type , attrs_type )
984
986
You can’t perform that action at this time.
0 commit comments