logger.warning("Classifier error: " + str(e))
-def barcode_reader(image) -> list:
+def barcode_reader(image) -> list[str]:
"""
Read any barcodes contained in image
Returns a list containing all found barcodes
return barcodes
-def scan_file_for_separating_barcodes(filepath: str) -> list:
+def scan_file_for_separating_barcodes(filepath: str) -> list[int]:
"""
Scan the provided file for page separating barcodes
Returns a list of pagenumbers, which separate the file
return separator_page_numbers
-def separate_pages(filepath: str, pages_to_split_on: list) -> list:
+def separate_pages(filepath: str, pages_to_split_on: list[int]) -> list[str]:
"""
Separate the provided file on the pages_to_split_on.
The pages which are defined by page_numbers will be removed.
return document_paths
-def save_to_dir(filepath, newname=None, target_dir=settings.CONSUMPTION_DIR):
+def save_to_dir(
+ filepath: str, newname: str = None, target_dir: str = settings.CONSUMPTION_DIR
+):
"""
Copies filepath to target_dir.
Optionally rename the file.