diff --git a/mayan/apps/converter/backends/python.py b/mayan/apps/converter/backends/python.py index da1e293557..5b9cb1d8cf 100644 --- a/mayan/apps/converter/backends/python.py +++ b/mayan/apps/converter/backends/python.py @@ -83,7 +83,9 @@ class Python(ConverterBase): try: page_count = len(list(PDFPage.get_pages(file_object))) except Exception as exception: - error_message = _('Exception determining PDF page count; %s') % exception + error_message = _( + 'Exception determining PDF page count; %s' + ) % exception logger.error(error_message) raise PageCountError(error_message) else: @@ -95,7 +97,9 @@ class Python(ConverterBase): try: image = Image.open(self.file_object) except IOError as exception: - error_message = _('Exception determining PDF page count; %s') % exception + error_message = _( + 'Exception determining PDF page count; %s' + ) % exception logger.error(error_message) raise PageCountError(error_message) finally: diff --git a/mayan/apps/converter/classes.py b/mayan/apps/converter/classes.py index 11922d0cfe..1c25b36241 100644 --- a/mayan/apps/converter/classes.py +++ b/mayan/apps/converter/classes.py @@ -26,7 +26,9 @@ CHUNK_SIZE = 1024 logger = logging.getLogger(__name__) try: - LIBREOFFICE = sh.Command(setting_libreoffice_path.value).bake('--headless', '--convert-to', 'pdf') + LIBREOFFICE = sh.Command( + setting_libreoffice_path.value + ).bake('--headless', '--convert-to', 'pdf') except sh.CommandNotFound: LIBREOFFICE = None diff --git a/mayan/apps/sources/admin.py b/mayan/apps/sources/admin.py index b8f2b38370..6360325b4e 100644 --- a/mayan/apps/sources/admin.py +++ b/mayan/apps/sources/admin.py @@ -27,7 +27,10 @@ class POP3EmailAdmin(admin.ModelAdmin): @admin.register(StagingFolderSource) class StagingFolderSourceAdmin(admin.ModelAdmin): - list_display = ('label', 'enabled', 'folder_path', 'preview_width', 'preview_height', 'uncompress', 'delete_after_upload') + list_display = ( + 'label', 'enabled', 'folder_path', 'preview_width', 'preview_height', + 'uncompress', 'delete_after_upload' + ) @admin.register(WatchFolderSource) diff --git a/mayan/apps/sources/forms.py b/mayan/apps/sources/forms.py index db2a29b9b9..2658396995 100644 --- a/mayan/apps/sources/forms.py +++ b/mayan/apps/sources/forms.py @@ -42,7 +42,10 @@ class UploadBaseForm(forms.Form): if show_expand: self.fields['expand'] = forms.BooleanField( label=_('Expand compressed files'), required=False, - help_text=ugettext('Upload a compressed file\'s contained files as individual documents') + help_text=ugettext( + 'Upload a compressed file\'s contained files as ' + 'individual documents' + ) ) diff --git a/mayan/apps/sources/tasks.py b/mayan/apps/sources/tasks.py index ad6108823e..9d6ee5c1e1 100644 --- a/mayan/apps/sources/tasks.py +++ b/mayan/apps/sources/tasks.py @@ -37,7 +37,9 @@ def task_upload_document(self, source_id, document_type_id, shared_uploaded_file try: document_type = DocumentType.objects.get(pk=document_type_id) source = Source.objects.get_subclass(pk=source_id) - shared_upload = SharedUploadedFile.objects.get(pk=shared_uploaded_file_id) + shared_upload = SharedUploadedFile.objects.get( + pk=shared_uploaded_file_id + ) if user_id: user = User.objects.get(pk=user_id) diff --git a/mayan/apps/sources/widgets.py b/mayan/apps/sources/widgets.py index acde863355..283624010a 100644 --- a/mayan/apps/sources/widgets.py +++ b/mayan/apps/sources/widgets.py @@ -15,7 +15,8 @@ from documents.settings import setting_preview_size, setting_thumbnail_size def staging_file_thumbnail(staging_file, **kwargs): return staging_file_html_widget( - staging_file, click_view='rest_api:stagingfolderfile-image-view', **kwargs + staging_file, click_view='rest_api:stagingfolderfile-image-view', + **kwargs )