@@ -230,19 +230,19 @@ def _save_document_references(self, destination_zip: ZipFileInterface) -> None:
230230 real_path = real_path .parent if path_part == ".." else real_path .joinpath (path_part )
231231 destination_zip .writestr (real_path .at , self .document_references [doc .referenced_document ])
232232
233- def extract_file (self , entity , outfile : Optional [Path ] = None ) -> Path :
233+ def extract_file (
234+ self , entity : Union [mdl .HeaderFile , mdl .BimSnippet , mdl .TopicDocumentReference ], outfile : Optional [Path ] = None
235+ ) -> Union [Path , str , None ]:
234236 """Extracts an element with a file into a temporary directory
235237
236238 These include header files, bim snippets, document references, and
237239 viewpoint bitmaps. External reference are not downloaded. Instead, the
238240 URI reference is returned.
239241
240242 :param entity: The entity with a file reference to extract
241- :type entity: bcf.v2.model.HeaderFile,bcf.v2.model.BimSnippet,bcf.v2.model.TopicDocumentReference
242243 :param outfile: If provided, save the header file to that location.
243244 Otherwise, a temporary directory is created and the filename is
244245 derived from the header's original filename.
245- :type outfile: pathlib.Path,optional
246246 :return: The filepath of the extracted file. It may be a URL if the
247247 header file is external.
248248 :rtype: Path
0 commit comments