@@ -44,7 +44,7 @@ def get_module_nodes(self):
4444 targets = [ast .Name (id = "__all__" )],
4545 value = ast .List (
4646 elts = [
47- ast .Str (s = node .name , kind = "str" )
47+ ast .Str (s = node .name , kind = None )
4848 for node in sorted (
4949 type_nodes , key = operator .attrgetter ("name" )
5050 )
@@ -200,7 +200,7 @@ def build(self) -> typing.Optional[ast.ClassDef]:
200200 doc_string = (
201201 f"Marshmallow schema for :class:`commercetools.types.{ self .resource .name } `."
202202 )
203- class_node .body .append (ast .Expr (value = ast .Str (s = doc_string , kind = "str" )))
203+ class_node .body .append (ast .Expr (value = ast .Str (s = doc_string , kind = None )))
204204
205205 # Add the field definitions
206206 for prop in self .resource .properties :
@@ -265,7 +265,7 @@ def build(self) -> typing.Optional[ast.ClassDef]:
265265 ast .Subscript (
266266 value = ast .Name (id = "data" ),
267267 slice = ast .Index (
268- value = ast .Str (s = d_field .attribute_name , kind = "str" )
268+ value = ast .Str (s = d_field .attribute_name , kind = None )
269269 ),
270270 )
271271 ]
@@ -299,7 +299,7 @@ def _create_schema_property(self, prop):
299299
300300 if prop .attribute_name != prop .name and not prop .name .startswith ("/" ):
301301 node .keywords .append (
302- ast .keyword (arg = "data_key" , value = ast .Str (s = prop .name , kind = "str" ))
302+ ast .keyword (arg = "data_key" , value = ast .Str (s = prop .name , kind = None ))
303303 )
304304
305305 if prop .name .startswith ("/" ):
@@ -319,7 +319,7 @@ def _create_schema_property(self, prop):
319319 arg = "pattern" ,
320320 value = ast .Call (
321321 func = ast .Name (id = "re.compile" ),
322- args = [ast .Str (s = prop .name [1 :- 1 ], kind = "str" )],
322+ args = [ast .Str (s = prop .name [1 :- 1 ], kind = None )],
323323 keywords = [],
324324 ),
325325 ),
@@ -433,16 +433,16 @@ def _create_discriminator_field(self, type_obj):
433433 arg = "discriminator_field" ,
434434 value = ast .Tuple (
435435 elts = [
436- ast .Str (s = field .name , kind = "str" ),
437- ast .Str (s = field .attribute_name , kind = "str" ),
436+ ast .Str (s = field .name , kind = None ),
437+ ast .Str (s = field .attribute_name , kind = None ),
438438 ]
439439 ),
440440 ),
441441 ast .keyword (
442442 arg = "discriminator_schemas" ,
443443 value = ast .Dict (
444- keys = [ast .Str (s = v , kind = "str" ) for v in items .keys ()],
445- values = [ast .Str (s = v , kind = "str" ) for v in items .values ()],
444+ keys = [ast .Str (s = v , kind = None ) for v in items .keys ()],
445+ values = [ast .Str (s = v , kind = None ) for v in items .values ()],
446446 ),
447447 ),
448448 ast .keyword (arg = "unknown" , value = ast .Name (id = "marshmallow.EXCLUDE" )),
@@ -470,7 +470,7 @@ def _create_nested_field(self, type_obj):
470470 arg = "nested" ,
471471 value = ast .Str (
472472 s = f"commercetools.schemas.{ type_obj .package_name } .{ type_obj .name } Schema" ,
473- kind = "str" ,
473+ kind = None ,
474474 ),
475475 ),
476476 ast .keyword (arg = "unknown" , value = ast .Name (id = "marshmallow.EXCLUDE" )),
@@ -486,7 +486,7 @@ def _create_regex_call(self, field_name, method_name):
486486 func = ast .Attribute (
487487 value = ast .Subscript (
488488 value = ast .Attribute (value = ast .Name (id = "self" ), attr = "fields" ),
489- slice = ast .Index (value = ast .Str (s = field_name , kind = "str" )),
489+ slice = ast .Index (value = ast .Str (s = field_name , kind = None )),
490490 ),
491491 attr = method_name ,
492492 ),
0 commit comments