Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix pycodestyle complaints

Daniel Quinnef302abed7ac
diff --git a/src/documents/models.py b/src/documents/models.py
index bf53cd857..0fffcc87e 100644
--- a/src/documents/models.py
+++ b/src/documents/models.py
@@ -194,7 +194,7 @@ class Document(models.Model):
TYPE_TIF = "tiff"
TYPE_TXT = "txt"
TYPE_CSV = "csv"
- TYPE_MD = "md"
+ TYPE_MD = "md"
TYPES = (TYPE_PDF, TYPE_PNG, TYPE_JPG, TYPE_GIF, TYPE_TIF,
TYPE_TXT, TYPE_CSV, TYPE_MD)
diff --git a/src/paperless_text/parsers.py b/src/paperless_text/parsers.py
index 50c341769..1b97d0ea1 100644
--- a/src/paperless_text/parsers.py
+++ b/src/paperless_text/parsers.py
@@ -44,7 +44,7 @@ class TextDocumentParser(DocumentParser):
def create_bg():
work_size = ",".join([str(n - 1) for n in psize])
- r = str(round(psize[0] / 10));
+ r = str(round(psize[0] / 10))
rounded = ",".join([r, r])
run_command(self.CONVERT, "-size ", picsize, ' xc:none -draw ',
'"fill ', bg_color, ' roundrectangle 0,0,',
@@ -128,4 +128,4 @@ def run_command(*args):
if not subprocess.Popen(' '.join(args), env=environment,
shell=True).wait() == 0:
- raise ParseError("Convert failed at {}".format(args))
\ No newline at end of file
+ raise ParseError("Convert failed at {}".format(args))
diff --git a/src/paperless_text/signals.py b/src/paperless_text/signals.py
index 598641e19..ae5a005e1 100644
--- a/src/paperless_text/signals.py
+++ b/src/paperless_text/signals.py
@@ -5,7 +5,7 @@ from .parsers import TextDocumentParser
class ConsumerDeclaration:
- MATCHING_FILES = re.compile("^.*\.(te?xt|md|csv)$")
+ MATCHING_FILES = re.compile(r"^.*\.(te?xt|md|csv)$")
@classmethod
def handle(cls, sender, **kwargs):