diff --git a/mindee/client.py b/mindee/client.py index eeda9d60..5f8a052b 100644 --- a/mindee/client.py +++ b/mindee/client.py @@ -227,17 +227,22 @@ def enqueue_and_parse( """ Enqueues to an asynchronous endpoint and automatically polls for a response. - :param product_class: The document class to use. The response object will be instantiated based on this parameter. + :param product_class: The document class to use. The response object will be instantiated based on this\ +parameter. :param input_source: The document/source file to use. Has to be created beforehand. - :param include_words: Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time. + :param include_words: Whether to include the full text for each page. This performs a full OCR operation on\ + the server and will increase response time. - :param close_file: Whether to ``close()`` the file after parsing it. Set to ``False`` if you need to access the file after this operation. + :param close_file: Whether to ``close()`` the file after parsing it. Set to ``False`` if you need to access\ + the file after this operation. - :param page_options: If set, remove pages from the document as specified. This is done before sending the file to the server. It is useful to avoid page limitations. + :param page_options: If set, remove pages from the document as specified. This is done before sending the file\ + to the server. It is useful to avoid page limitations. - :param cropper: Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time. + :param cropper: Whether to include cropper results for each page. This performs a cropping operation on the\ + server and will increase response time. :param endpoint: For custom endpoints, an endpoint has to be given. diff --git a/mindee/parsing/generated/__init__.py b/mindee/parsing/generated/__init__.py index debeb301..0f6f7f22 100644 --- a/mindee/parsing/generated/__init__.py +++ b/mindee/parsing/generated/__init__.py @@ -2,4 +2,4 @@ from mindee.parsing.generated.generated_object import ( GeneratedObjectField, is_generated_object, -) \ No newline at end of file +) diff --git a/mindee/parsing/generated/generated_object.py b/mindee/parsing/generated/generated_object.py index 64855814..a2c3d354 100644 --- a/mindee/parsing/generated/generated_object.py +++ b/mindee/parsing/generated/generated_object.py @@ -55,7 +55,7 @@ def _str_level(self, level=0) -> str: "confidence", "raw_value", ]: - value = self.__getattribute__(attr) + value = getattr(self, attr) str_value = str(value) if value is not None else "" out_str += f"\n{indent}:{attr}: {str_value}" return "\n" + indent + (out_str.strip()) diff --git a/mindee/product/generated/__init__.py b/mindee/product/generated/__init__.py index 513906f3..01c2a2be 100644 --- a/mindee/product/generated/__init__.py +++ b/mindee/product/generated/__init__.py @@ -1,5 +1,5 @@ from mindee.product.generated.generated_v1 import ( GeneratedV1, GeneratedV1Document, - GeneratedV1Page + GeneratedV1Page, )