mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Runs the pre-commit hooks over all the Python files
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
from paperless_text.signals import text_consumer_declaration
|
||||
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import os
|
||||
|
||||
from PIL import ImageDraw, ImageFont, Image
|
||||
from django.conf import settings
|
||||
|
||||
from documents.parsers import DocumentParser
|
||||
from PIL import Image
|
||||
from PIL import ImageDraw
|
||||
from PIL import ImageFont
|
||||
|
||||
|
||||
class TextDocumentParser(DocumentParser):
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
from paperless_text.parsers import TextDocumentParser
|
||||
|
||||
@@ -13,7 +12,8 @@ class TestTextParser(DirectoriesMixin, TestCase):
|
||||
|
||||
# just make sure that it does not crash
|
||||
f = parser.get_thumbnail(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"),
|
||||
"text/plain",
|
||||
)
|
||||
self.assertTrue(os.path.isfile(f))
|
||||
|
||||
@@ -22,7 +22,8 @@ class TestTextParser(DirectoriesMixin, TestCase):
|
||||
parser = TextDocumentParser(None)
|
||||
|
||||
parser.parse(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"),
|
||||
"text/plain",
|
||||
)
|
||||
|
||||
self.assertEqual(parser.get_text(), "This is a test file.\n")
|
||||
|
Reference in New Issue
Block a user