@@ -264,7 +264,9 @@ def build(self) -> typing.Optional[ast.ClassDef]:
264264 targets = [
265265 ast .Subscript (
266266 value = ast .Name (id = "data" ),
267- slice = ast .Index (value = ast .Str (s = d_field .attribute_name , kind = "str" )),
267+ slice = ast .Index (
268+ value = ast .Str (s = d_field .attribute_name , kind = "str" )
269+ ),
268270 )
269271 ]
270272 ),
@@ -277,7 +279,9 @@ def _create_schema_property(self, prop):
277279 if prop .many :
278280 if node .func .id == "marshmallow.fields.Nested" :
279281 node .keywords .append (
280- ast .keyword (arg = "many" , value = ast .NameConstant (value = True , kind = None ))
282+ ast .keyword (
283+ arg = "many" , value = ast .NameConstant (value = True , kind = None )
284+ )
281285 )
282286 else :
283287 node = ast .Call (
@@ -288,7 +292,9 @@ def _create_schema_property(self, prop):
288292
289293 if prop .optional :
290294 node .keywords .append (
291- ast .keyword (arg = "missing" , value = ast .NameConstant (value = None , kind = None ))
295+ ast .keyword (
296+ arg = "missing" , value = ast .NameConstant (value = None , kind = None )
297+ )
292298 )
293299
294300 if prop .attribute_name != prop .name and not prop .name .startswith ("/" ):
@@ -331,7 +337,11 @@ def _get_property_field(self, prop):
331337 return ast .Call (
332338 func = ast .Name (id = FIELD_TYPES ["object" ]),
333339 args = [],
334- keywords = [ast .keyword (arg = "allow_none" , value = ast .NameConstant (True , kind = None ))],
340+ keywords = [
341+ ast .keyword (
342+ arg = "allow_none" , value = ast .NameConstant (True , kind = None )
343+ )
344+ ],
335345 )
336346 elif prop .type .enum :
337347 self .generator .add_import_statement (
@@ -340,7 +350,9 @@ def _get_property_field(self, prop):
340350 return ast .Call (
341351 func = ast .Name (id = "marshmallow_enum.EnumField" ),
342352 args = [ast .Attribute (value = ast .Name (id = "types" ), attr = prop .type .name )],
343- keywords = [ast .keyword (arg = "by_value" , value = ast .NameConstant (True , kind = None ))],
353+ keywords = [
354+ ast .keyword (arg = "by_value" , value = ast .NameConstant (True , kind = None ))
355+ ],
344356 )
345357
346358 elif prop .type .discriminator :
@@ -355,7 +367,11 @@ def _get_property_field(self, prop):
355367 node = ast .Call (
356368 func = ast .Name (id = FIELD_TYPES [prop .type .name ]),
357369 args = [],
358- keywords = [ast .keyword (arg = "allow_none" , value = ast .NameConstant (True , kind = None ))],
370+ keywords = [
371+ ast .keyword (
372+ arg = "allow_none" , value = ast .NameConstant (True , kind = None )
373+ )
374+ ],
359375 )
360376 if prop .type .name == "array" :
361377 assert prop .items , f"The array property { prop .name } has no items"
@@ -382,7 +398,11 @@ def _get_property_field(self, prop):
382398 return ast .Call (
383399 func = ast .Name (id = prop .type .name + "Field" ),
384400 args = [],
385- keywords = [ast .keyword (arg = "allow_none" , value = ast .NameConstant (True , kind = None ))],
401+ keywords = [
402+ ast .keyword (
403+ arg = "allow_none" , value = ast .NameConstant (True , kind = None )
404+ )
405+ ],
386406 )
387407
388408 elif prop .type .base and prop .type .base .name == "string" :
@@ -412,7 +432,10 @@ def _create_discriminator_field(self, type_obj):
412432 ast .keyword (
413433 arg = "discriminator_field" ,
414434 value = ast .Tuple (
415- elts = [ast .Str (s = field .name , kind = "str" ), ast .Str (s = field .attribute_name , kind = "str" )]
435+ elts = [
436+ ast .Str (s = field .name , kind = "str" ),
437+ ast .Str (s = field .attribute_name , kind = "str" ),
438+ ]
416439 ),
417440 ),
418441 ast .keyword (
@@ -447,7 +470,7 @@ def _create_nested_field(self, type_obj):
447470 arg = "nested" ,
448471 value = ast .Str (
449472 s = f"commercetools.schemas.{ type_obj .package_name } .{ type_obj .name } Schema" ,
450- kind = "str"
473+ kind = "str" ,
451474 ),
452475 ),
453476 ast .keyword (arg = "unknown" , value = ast .Name (id = "marshmallow.EXCLUDE" )),
0 commit comments