diff --git a/mayan/apps/authentication/links.py b/mayan/apps/authentication/links.py index 45c67515c2..1d2ad72911 100644 --- a/mayan/apps/authentication/links.py +++ b/mayan/apps/authentication/links.py @@ -9,8 +9,9 @@ from .icons import icon_logout, icon_password_change def has_usable_password_and_can_change_password(context): return ( - context['request'].user.has_usable_password and - not context['request'].user.user_options.block_password_change + context['request'].user.has_usable_password and not context[ + 'request' + ].user.user_options.block_password_change ) diff --git a/mayan/apps/documents/api_views.py b/mayan/apps/documents/api_views.py index 6a77a358b0..0a455d6417 100644 --- a/mayan/apps/documents/api_views.py +++ b/mayan/apps/documents/api_views.py @@ -6,7 +6,6 @@ from furl import furl from django.http import HttpResponse from django.shortcuts import get_object_or_404 -from django.utils.encoding import force_bytes from django.views.decorators.cache import cache_control, patch_cache_control from django_downloadview import DownloadMixin, VirtualFile diff --git a/mayan/apps/documents/models.py b/mayan/apps/documents/models.py index f21f464b70..7a9a849d41 100644 --- a/mayan/apps/documents/models.py +++ b/mayan/apps/documents/models.py @@ -886,7 +886,7 @@ class DocumentPage(models.Model): final_url.args['transformation_{}_name'.format(count)] = name final_url.args['transformation_{}_kwargs'.format(count)] = kwargs - count = count +1 + count = count + 1 return final_url.tostr() diff --git a/mayan/apps/mailer/forms.py b/mayan/apps/mailer/forms.py index a1649a6b1e..eadedf15d6 100644 --- a/mayan/apps/mailer/forms.py +++ b/mayan/apps/mailer/forms.py @@ -9,8 +9,6 @@ from acls.models import AccessControlList from common.forms import DynamicModelForm from common.settings import setting_project_title, setting_project_url -import mayan - from .classes import MailerBackend from .models import UserMailer from .permissions import permission_user_mailer_use diff --git a/mayan/apps/metadata/tests/test_views.py b/mayan/apps/metadata/tests/test_views.py index edff891e06..033aa0f9cc 100644 --- a/mayan/apps/metadata/tests/test_views.py +++ b/mayan/apps/metadata/tests/test_views.py @@ -328,8 +328,7 @@ class DocumentMetadataTestCase(GenericDocumentViewTestCase): 'metadata_type', flat=True ) self.assertTrue( - self.metadata_type.pk in document_metadata_types and - metadata_type_2.pk in document_metadata_types + self.metadata_type.pk in document_metadata_types and metadata_type_2.pk in document_metadata_types ) diff --git a/mayan/settings/literals.py b/mayan/settings/literals.py index 820a4c8169..7cd0108d68 100644 --- a/mayan/settings/literals.py +++ b/mayan/settings/literals.py @@ -2,31 +2,13 @@ from __future__ import unicode_literals DJANGO_SETTINGS_LIST = ( 'ALLOWED_HOSTS', 'APPEND_SLASH', 'AUTH_PASSWORD_VALIDATORS', - 'DATA_UPLOAD_MAX_MEMORY_SIZE', - 'DATABASES', - 'DEBUG', - 'DEFAULT_FROM_EMAIL', - 'DISALLOWED_USER_AGENTS', - 'EMAIL_BACKEND', - 'EMAIL_HOST', - 'EMAIL_HOST_PASSWORD', - 'EMAIL_HOST_USER', - 'EMAIL_PORT', - 'EMAIL_TIMEOUT', - 'EMAIL_USE_SSL', - 'EMAIL_USE_TLS', - 'FILE_UPLOAD_MAX_MEMORY_SIZE', - 'HOME_VIEW', - 'INSTALLED_APPS', - 'INTERNAL_IPS', - 'LANGUAGES', - 'LANGUAGE_CODE', - 'LOGIN_REDIRECT_URL', - 'LOGIN_URL', - 'STATIC_URL', - 'STATICFILES_STORAGE', - 'TIME_ZONE', - 'WSGI_APPLICATION', + 'DATA_UPLOAD_MAX_MEMORY_SIZE', 'DATABASES', 'DEBUG', 'DEFAULT_FROM_EMAIL', + 'DISALLOWED_USER_AGENTS', 'EMAIL_BACKEND', 'EMAIL_HOST', + 'EMAIL_HOST_PASSWORD', 'EMAIL_HOST_USER', 'EMAIL_PORT', 'EMAIL_TIMEOUT', + 'EMAIL_USE_SSL', 'EMAIL_USE_TLS', 'FILE_UPLOAD_MAX_MEMORY_SIZE', + 'HOME_VIEW', 'INSTALLED_APPS', 'INTERNAL_IPS', 'LANGUAGES', + 'LANGUAGE_CODE', 'LOGIN_REDIRECT_URL', 'LOGIN_URL', 'STATIC_URL', + 'STATICFILES_STORAGE', 'TIME_ZONE', 'WSGI_APPLICATION', ) DEFAULT_SECRET_KEY = 'secret-key-missing!'