@@ -106,11 +106,12 @@ def test_write_missing_aas_objects(self):
106106 "/aasx/selection.xml" ,
107107 ["https://acplt.org/Test_AssetAdministrationShell" ,
108108 "http://false-identifier.org/" ,
109- "http://acplt.org/Submodels/Assets/TestAsset/Identification" ],
109+ "http://acplt.org/Submodels/Assets/TestAsset/Identification" ],
110110 data , aasx .DictSupplementaryFileContainer ()
111111 )
112112
113- self .assertIn ("Could not find identifiable http://false-identifier.org/ in IdentifiableStore" , log .output [0 ])
113+ self .assertIn ("Could not find identifiable http://false-identifier.org/ in IdentifiableStore" ,
114+ log .output [0 ])
114115
115116 # assert only the two existing objects have been written to aasx file
116117 object_store = model .DictIdentifiableStore ()
@@ -142,7 +143,7 @@ def test_writing_with_missing_file(self) -> None:
142143 self .assertIn ("Could not find file" , cm .exception .args [0 ])
143144
144145 def test_writing_file_twice (self ) -> None :
145- with tempfile .TemporaryDirectory () as tmpdir :
146+ with ( tempfile .TemporaryDirectory () as tmpdir ) :
146147 tmpdir_path = Path (tmpdir )
147148
148149 # ---- Arange ----
@@ -167,7 +168,8 @@ def test_writing_file_twice(self) -> None:
167168 value = resulting_file_name
168169 )]
169170 )
170- data = model .DictIdentifiableStore ([first_submodel , second_submodel ])
171+ data : model .DictIdentifiableStore [model .Identifiable ] \
172+ = model .DictIdentifiableStore ([first_submodel , second_submodel ])
171173
172174 # ---- Act & Assert ----
173175 with self .assertNoLogs (level = "WARNING" ):
@@ -184,7 +186,6 @@ def test_write_non_aas(self) -> None:
184186 with open (Path (__file__ ).parent / "TestFile.pdf" , "rb" ) as pdf :
185187 file_store .add_file ("/TestFile.pdf" , pdf , "application/pdf" )
186188
187-
188189 # ---- Act & Assert ----
189190 # assert warning is present in failsafe mode
190191 with self .assertLogs (level = "WARNING" ) as log :
@@ -199,7 +200,7 @@ def test_write_non_aas(self) -> None:
199200 # try to write a non AAS object
200201 writer .write_aas ("https://acplt.org/Test_Submodel" , data , file_store )
201202 self .assertIn ("Identifier https://acplt.org/Test_Submodel does not belong "
202- "to an AssetAdministrationShell" ,cm .exception .args [0 ])
203+ "to an AssetAdministrationShell" , cm .exception .args [0 ])
203204
204205 def test_write_aas_missing_submodel (self ) -> None :
205206 with tempfile .TemporaryDirectory () as tmpdir :
@@ -315,7 +316,6 @@ def test_write_core_properties_twice(self) -> None:
315316
316317 self .assertIn ("Core Properties have already been written" , cm .exception .args [0 ])
317318
318-
319319 def test_write_thumbnail_twice (self ) -> None :
320320 with tempfile .TemporaryDirectory () as tmpdir :
321321 tmpdir_path = Path (tmpdir )
@@ -334,7 +334,6 @@ def test_write_thumbnail_twice(self) -> None:
334334
335335 self .assertIn ("package thumbnail has already been written" , cm .exception .args [0 ])
336336
337-
338337 def test_writing_reading_example_aas (self ) -> None :
339338 # Create example data and file_store
340339 data = example_aas .create_full_example () # creates a complete, valid example AAS
@@ -457,7 +456,7 @@ def test_get_thumbnail(self) -> None:
457456 # ---- Arange ----
458457 tmpdir_path = Path (tmpdir )
459458
460- data = model .DictIdentifiableStore ([
459+ data : model . DictIdentifiableStore [ model . Identifiable ] = model .DictIdentifiableStore ([
461460 model .AssetAdministrationShell (
462461 id_ = "http://example.org/Test_AAS" ,
463462 asset_information = model .AssetInformation (
0 commit comments