Fixes ruff not running isort against the codebase

This commit is contained in:
Trenton H
2023-04-20 08:10:17 -07:00
parent e0d2697618
commit 3bcbd05252
160 changed files with 347 additions and 224 deletions

View File

@@ -1,4 +1,5 @@
from django.apps import AppConfig
from paperless_tesseract.signals import tesseract_consumer_declaration

View File

@@ -3,8 +3,8 @@ import subprocess
from django.conf import settings
from django.core.checks import Error
from django.core.checks import register
from django.core.checks import Warning
from django.core.checks import register
def get_tesseract_langs():

View File

@@ -7,11 +7,12 @@ from pathlib import Path
from typing import Optional
from django.conf import settings
from documents.parsers import DocumentParser
from documents.parsers import make_thumbnail_from_pdf
from documents.parsers import ParseError
from PIL import Image
from documents.parsers import DocumentParser
from documents.parsers import ParseError
from documents.parsers import make_thumbnail_from_pdf
class NoTextFoundException(Exception):
pass
@@ -310,7 +311,8 @@ class RasterisedDocumentParser(DocumentParser):
# text located via OCR
import ocrmypdf
from ocrmypdf import InputFileError, EncryptedPdfError
from ocrmypdf import EncryptedPdfError
from ocrmypdf import InputFileError
archive_path = Path(os.path.join(self.tempdir, "archive.pdf"))
sidecar_file = Path(os.path.join(self.tempdir, "sidecar.txt"))

View File

@@ -1,8 +1,9 @@
from unittest import mock
from django.core.checks import ERROR
from django.test import override_settings
from django.test import TestCase
from django.test import override_settings
from paperless_tesseract import check_default_language_available

View File

@@ -5,14 +5,15 @@ import uuid
from typing import ContextManager
from unittest import mock
from django.test import override_settings
from django.test import TestCase
from django.test import override_settings
from documents.parsers import ParseError
from documents.parsers import run_convert
from documents.tests.utils import DirectoriesMixin
from documents.tests.utils import FileSystemAssertsMixin
from paperless_tesseract.parsers import post_process_text
from paperless_tesseract.parsers import RasterisedDocumentParser
from paperless_tesseract.parsers import post_process_text
image_to_string_calls = []