mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Fix pycodestyle complaints
This commit is contained in:
		@@ -194,7 +194,7 @@ class Document(models.Model):
 | 
				
			|||||||
    TYPE_TIF = "tiff"
 | 
					    TYPE_TIF = "tiff"
 | 
				
			||||||
    TYPE_TXT = "txt"
 | 
					    TYPE_TXT = "txt"
 | 
				
			||||||
    TYPE_CSV = "csv"
 | 
					    TYPE_CSV = "csv"
 | 
				
			||||||
    TYPE_MD  = "md"
 | 
					    TYPE_MD = "md"
 | 
				
			||||||
    TYPES = (TYPE_PDF, TYPE_PNG, TYPE_JPG, TYPE_GIF, TYPE_TIF,
 | 
					    TYPES = (TYPE_PDF, TYPE_PNG, TYPE_JPG, TYPE_GIF, TYPE_TIF,
 | 
				
			||||||
             TYPE_TXT, TYPE_CSV, TYPE_MD)
 | 
					             TYPE_TXT, TYPE_CSV, TYPE_MD)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ class TextDocumentParser(DocumentParser):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        def create_bg():
 | 
					        def create_bg():
 | 
				
			||||||
            work_size = ",".join([str(n - 1) for n in psize])
 | 
					            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])
 | 
					            rounded = ",".join([r, r])
 | 
				
			||||||
            run_command(self.CONVERT, "-size ", picsize, ' xc:none -draw ',
 | 
					            run_command(self.CONVERT, "-size ", picsize, ' xc:none -draw ',
 | 
				
			||||||
                        '"fill ', bg_color, ' roundrectangle 0,0,',
 | 
					                        '"fill ', bg_color, ' roundrectangle 0,0,',
 | 
				
			||||||
@@ -128,4 +128,4 @@ def run_command(*args):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if not subprocess.Popen(' '.join(args), env=environment,
 | 
					    if not subprocess.Popen(' '.join(args), env=environment,
 | 
				
			||||||
                            shell=True).wait() == 0:
 | 
					                            shell=True).wait() == 0:
 | 
				
			||||||
        raise ParseError("Convert failed at {}".format(args))
 | 
					        raise ParseError("Convert failed at {}".format(args))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@ from .parsers import TextDocumentParser
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class ConsumerDeclaration:
 | 
					class ConsumerDeclaration:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MATCHING_FILES = re.compile("^.*\.(te?xt|md|csv)$")
 | 
					    MATCHING_FILES = re.compile(r"^.*\.(te?xt|md|csv)$")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def handle(cls, sender, **kwargs):
 | 
					    def handle(cls, sender, **kwargs):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user