mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +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
|
width=self._dpage.dimension.width, height=self._dpage.dimension.height
|
||||||
)
|
)
|
||||||
|
|
||||||
def unload(self):
|
def unload(self) -> None:
|
||||||
self._ppage = None
|
if hasattr(self, "_im"):
|
||||||
self._dpage = None
|
delattr(self, "_im")
|
||||||
|
if hasattr(self, "_dpage"):
|
||||||
|
delattr(self, "_dpage")
|
||||||
|
|
||||||
|
|
||||||
class _UseType(str, Enum):
|
class _UseType(str, Enum):
|
||||||
@ -392,6 +394,6 @@ class MetsGbsDocumentBackend(PaginatedDocumentBackend):
|
|||||||
def supports_pagination(cls) -> bool:
|
def supports_pagination(cls) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def unload(self):
|
def unload(self) -> None:
|
||||||
super().unload()
|
super().unload()
|
||||||
self._tar.close()
|
self._tar.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user