mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
fix typing and unloading
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
3e4093db58
commit
bbb735d2de
@ -133,9 +133,11 @@ class MetsGbsPageBackend(PdfPageBackend):
|
||||
width=self._dpage.dimension.width, height=self._dpage.dimension.height
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self._ppage = None
|
||||
self._dpage = None
|
||||
def unload(self) -> None:
|
||||
if hasattr(self, "_im"):
|
||||
delattr(self, "_im")
|
||||
if hasattr(self, "_dpage"):
|
||||
delattr(self, "_dpage")
|
||||
|
||||
|
||||
class _UseType(str, Enum):
|
||||
@ -392,6 +394,6 @@ class MetsGbsDocumentBackend(PaginatedDocumentBackend):
|
||||
def supports_pagination(cls) -> bool:
|
||||
return True
|
||||
|
||||
def unload(self):
|
||||
def unload(self) -> None:
|
||||
super().unload()
|
||||
self._tar.close()
|
||||
|
Loading…
Reference in New Issue
Block a user