@@ -19,9 +19,7 @@ def __init__(self, reqif_bundle: ReqIFBundle):
1919 spec_object_type_attributes : Dict [str , SpecAttributeDefinition ] = {}
2020 spec_object_type_names : Dict [str , str ] = {}
2121 detected_section_spec_type : Optional [ReqIFSpecObjectType ] = None
22- detected_chapter_name_attribute : Optional [
23- SpecAttributeDefinition
24- ] = None
22+ detected_chapter_name_attribute : Optional [SpecAttributeDefinition ] = None
2523 detected_schema_type : ReqIFSchema .ReqIFSchemaType = (
2624 ReqIFSchema .ReqIFSchemaType .DEFAULT
2725 )
@@ -47,27 +45,25 @@ def __init__(self, reqif_bundle: ReqIFBundle):
4745 for attribute_definition in spec_type .attribute_definitions :
4846 if attribute_definition .long_name == "ReqIF.ChapterName" :
4947 detected_chapter_name_attribute = attribute_definition
50- spec_object_type_attributes [
51- attribute_definition . identifier
52- ] = attribute_definition
48+ spec_object_type_attributes [attribute_definition . identifier ] = (
49+ attribute_definition
50+ )
5351
5452 assert reqif_bundle .core_content .req_if_content .data_types is not None
5553 for data_type in reqif_bundle .core_content .req_if_content .data_types :
5654 data_type_definitions [data_type .identifier ] = data_type
5755
5856 self .data_type_definitions : Dict [str , Any ] = data_type_definitions
59- self .spec_object_type_attributes : Dict [
60- str , SpecAttributeDefinition
61- ] = spec_object_type_attributes
57+ self .spec_object_type_attributes : Dict [str , SpecAttributeDefinition ] = (
58+ spec_object_type_attributes
59+ )
6260 self .spec_object_type_names : Dict [str , str ] = spec_object_type_names
6361 self .reqif_bundle : ReqIFBundle = reqif_bundle
6462 self .detected_heading_spec_type = detected_section_spec_type
65- self .detected_chapter_name_attribute : Optional [
66- SpecAttributeDefinition
67- ] = detected_chapter_name_attribute
68- self .detected_schema_type : ReqIFSchema .ReqIFSchemaType = (
69- detected_schema_type
63+ self .detected_chapter_name_attribute : Optional [SpecAttributeDefinition ] = (
64+ detected_chapter_name_attribute
7065 )
66+ self .detected_schema_type : ReqIFSchema .ReqIFSchemaType = detected_schema_type
7167
7268 def is_spec_object_a_heading (self , spec_object : ReqIFSpecObject ):
7369 if self .detected_heading_spec_type is not None :
@@ -92,4 +88,7 @@ def iterate_unique_field_names(self):
9288 if attribute_definition_ .long_name in unique_names_so_far :
9389 continue
9490 unique_names_so_far .add (attribute_definition_ .long_name )
95- yield attribute_definition_ .long_name , attribute_definition_ .attribute_type .name
91+ yield (
92+ attribute_definition_ .long_name ,
93+ attribute_definition_ .attribute_type .name ,
94+ )
0 commit comments