run black

Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
This commit is contained in:
florian on nixos (Florian Brandes)
2022-03-24 21:30:34 +01:00
committed by Florian Brandes
parent 11c34e496a
commit 866aa55b92
2 changed files with 24 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ from pdf2image import convert_from_path
from pikepdf import Pdf
from pyzbar import pyzbar
from whoosh.writing import AsyncWriter
# barcode decoder
logger = logging.getLogger("paperless.tasks")
@@ -156,6 +157,7 @@ def separate_pages(filepath: str, pages_to_split_on: list) -> list:
logger.debug(f"Temp files are {str(document_paths)}")
return document_paths
def save_to_dir(filepath, target_dir=settings.CONSUMPTION_DIR):
"""
Copies filepath to target_dir.
@@ -165,6 +167,7 @@ def save_to_dir(filepath, target_dir=settings.CONSUMPTION_DIR):
else:
logger.warning(f"{str(filepath)} or {str(target_dir)} don't exist.")
def consume_file(
path,
override_filename=None,