From 284eabe1f7b87b2b7202747f81b9c2951ce1856b Mon Sep 17 00:00:00 2001 From: Mislav Date: Mon, 17 Mar 2025 22:43:57 +1300 Subject: [PATCH] removed unnecessary hasattr check --- docling/document_converter.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docling/document_converter.py b/docling/document_converter.py index 17acf110..0884cc58 100644 --- a/docling/document_converter.py +++ b/docling/document_converter.py @@ -188,11 +188,7 @@ class DocumentConverter: def _get_pipeline_options_hash(self, pipeline_options: PipelineOptions) -> str: """Generate a hash of pipeline options to use as part of the cache key.""" - options_str = str( - pipeline_options.model_dump() - if hasattr(pipeline_options, "model_dump") - else pipeline_options - ) + options_str = str(pipeline_options.model_dump()) return hashlib.md5(options_str.encode("utf-8")).hexdigest() def initialize_pipeline(self, format: InputFormat):