Skip to content

Commit e6cf806

Browse files
fix stupid pycharm messing with random strings
1 parent b704ca6 commit e6cf806

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

mindee/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def parse(
9292
This performs a full OCR operation on the server and will increase response time.
9393
Only available on financial document APIs.
9494
95-
:param close_file: Whether to ``close()`` the file after product it.
95+
:param close_file: Whether to ``close()`` the file after parsing it.
9696
Set to ``False`` if you need to access the file after this operation.
9797
9898
:param page_options: If set, remove pages from the document as specified.
@@ -154,7 +154,7 @@ def enqueue(
154154
:param include_words: Whether to include the full text for each page.
155155
This performs a full OCR operation on the server and will increase response time.
156156
157-
:param close_file: Whether to ``close()`` the file after product it.
157+
:param close_file: Whether to ``close()`` the file after parsing it.
158158
Set to ``False`` if you need to access the file after this operation.
159159
160160
:param page_options: If set, remove pages from the document as specified.
@@ -299,7 +299,7 @@ def enqueue_and_parse( # pylint: disable=too-many-locals
299299
:param include_words: Whether to include the full text for each page.
300300
This performs a full OCR operation on the server and will increase response time.
301301
302-
:param close_file: Whether to ``close()`` the file after product it.
302+
:param close_file: Whether to ``close()`` the file after parsing it.
303303
Set to ``False`` if you need to access the file after this operation.
304304
305305
:param page_options: If set, remove pages from the document as specified.

mindee/commands/cli_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MindeeParser:
104104
parser: MindeeArgumentParser
105105
"""Parser options."""
106106
parsed_args: Namespace
107-
"""Stores attributes relating to product."""
107+
"""Stores attributes relating to parsing."""
108108
client: Client
109109
"""Mindee client"""
110110
document_info: CommandConfig
@@ -159,7 +159,7 @@ def call_parse(self) -> None:
159159
print(response.raw_http)
160160
else:
161161
if response.document is None:
162-
raise MindeeClientError("Something went wrong during async product.")
162+
raise MindeeClientError("Something went wrong during async parsing.")
163163
# print the OCR
164164
if self.parsed_args.include_words:
165165
print("#############\nDocument Text\n#############\n::\n")

mindee/error/mindee_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class MindeeError(RuntimeError):
44

55
class MindeeClientError(MindeeError):
66
"""
7-
An exception relating to document product errors.
7+
An exception relating to document parsing errors.
88
99
Not to be confused with `MindeeHTTPClientError`.
1010
"""

mindee/mindee_http/endpoint.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def predict_req_post(
4444
4545
:param input_source: Input object
4646
:param include_words: Include raw OCR words in the response
47-
:param close_file: Whether to `close()` the file after product it.
47+
:param close_file: Whether to `close()` the file after parsing it.
4848
:param cropper: Including Mindee cropping results.
4949
:param full_text: Whether to include the full OCR text response in compatible APIs.
5050
:return: requests response
@@ -68,7 +68,7 @@ def predict_async_req_post(
6868
6969
:param input_source: Input object
7070
:param include_words: Include raw OCR words in the response
71-
:param close_file: Whether to `close()` the file after product it.
71+
:param close_file: Whether to `close()` the file after parsing it.
7272
:param cropper: Including Mindee cropping results.
7373
:param full_text: Whether to include the full OCR text response in compatible APIs.
7474
:param workflow_id: Workflow ID.
@@ -184,7 +184,7 @@ def training_req_post(
184184
185185
:param input_source: Input object
186186
:return: requests response
187-
:param close_file: Whether to `close()` the file after product it.
187+
:param close_file: Whether to `close()` the file after parsing it.
188188
"""
189189
files = {"document": input_source.read_contents(close_file)}
190190
params = {"training": True, "with_candidates": True}
@@ -206,7 +206,7 @@ def training_async_req_post(
206206
207207
:param input_source: Input object
208208
:return: requests response
209-
:param close_file: Whether to `close()` the file after product it.
209+
:param close_file: Whether to `close()` the file after parsing it.
210210
"""
211211
files = {"document": input_source.read_contents(close_file)}
212212
params = {"training": True, "async": True}

mindee/mindee_http/response_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def clean_request_json(response: requests.Response) -> StringDict:
5656
Checks and correct the response error format depending on the two possible kind of returns.
5757
5858
:param response: Raw request response.
59-
:return: Returns the job error if the error is due to product, returns the http error otherwise.
59+
:return: Returns the job error if the error is due to parsing, returns the http error otherwise.
6060
"""
6161
response_json = response.json()
6262
if response.status_code < 200 or response.status_code > 302:

tests/v1/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_cut_options(dummy_client: Client):
9797
f"{FILE_TYPES_DIR}/pdf/multipage.pdf"
9898
)
9999
try:
100-
# need to keep file open to count the pages after product
100+
# need to keep file open to count the pages after parsing
101101
dummy_client.parse(
102102
ReceiptV5,
103103
input_doc,

0 commit comments

Comments
 (0)