@@ -4028,18 +4028,17 @@ def is_valid_var_arg(self, typ: Type) -> bool:
4028
4028
def is_valid_keyword_var_arg (self , typ : Type ) -> bool :
4029
4029
"""Is a type valid as a **kwargs argument?"""
4030
4030
mapping_type = self .chk .named_generic_type (
4031
- 'typing.Mapping' , [self .named_type ('builtins.str' ), AnyType (TypeOfAny .special_form )])
4031
+ 'typing.Mapping' , [self .named_type ('builtins.str' ), AnyType (TypeOfAny .special_form )])
4032
4032
typ = get_proper_type (typ )
4033
4033
4034
4034
ret = (
4035
4035
is_subtype (typ , mapping_type ) or
4036
- is_subtype (typ , self .chk .named_generic_type ('typing.Mapping' ,
4037
- [UninhabitedType (), UninhabitedType ()])) or
4038
4036
(isinstance (typ , Instance ) and
4039
4037
is_subtype (typ , self .chk .named_type ('typing.Mapping' )) and
4040
4038
try_getting_str_literals_from_type (map_instance_to_supertype (
4041
- typ , mapping_type .type ).args [0 ]) is not None
4042
- ) or
4039
+ typ , mapping_type .type ).args [0 ]) is not None ) or
4040
+ is_subtype (typ , self .chk .named_generic_type ('typing.Mapping' ,
4041
+ [UninhabitedType (), UninhabitedType ()])) or
4043
4042
isinstance (typ , ParamSpecType )
4044
4043
)
4045
4044
if self .chk .options .python_version [0 ] < 3 :
0 commit comments