@@ -854,7 +854,7 @@ def invalid_keyword_var_arg(self, typ: Type, is_mapping: bool, context: Context)
854
854
suffix = ', not {}' .format (format_type (typ ))
855
855
self .fail (
856
856
'Argument after ** must be a mapping{}' .format (suffix ),
857
- context )
857
+ context , code = codes . ARG_TYPE )
858
858
859
859
def undefined_in_superclass (self , member : str , context : Context ) -> None :
860
860
self .fail ('"{}" undefined in superclass' .format (member ), context )
@@ -867,7 +867,8 @@ def first_argument_for_super_must_be_type(self, actual: Type, context: Context)
867
867
type_str = 'a non-type instance'
868
868
else :
869
869
type_str = format_type (actual )
870
- self .fail ('Argument 1 for "super" must be a type object; got {}' .format (type_str ), context )
870
+ self .fail ('Argument 1 for "super" must be a type object; got {}' .format (type_str ), context ,
871
+ code = codes .ARG_TYPE )
871
872
872
873
def too_few_string_formatting_arguments (self , context : Context ) -> None :
873
874
self .fail ('Not enough arguments for format string' , context ,
@@ -1188,7 +1189,8 @@ def typeddict_setdefault_arguments_inconsistent(
1188
1189
expected : Type ,
1189
1190
context : Context ) -> None :
1190
1191
msg = 'Argument 2 to "setdefault" of "TypedDict" has incompatible type {}; expected {}'
1191
- self .fail (msg .format (format_type (default ), format_type (expected )), context )
1192
+ self .fail (msg .format (format_type (default ), format_type (expected )), context ,
1193
+ code = codes .ARG_TYPE )
1192
1194
1193
1195
def type_arguments_not_allowed (self , context : Context ) -> None :
1194
1196
self .fail ('Parameterized generics cannot be used with class or instance checks' , context )
0 commit comments