From bfe621ba89551868dfd060b1460d39b64b46ef6d Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 19 Oct 2015 01:27:26 -0400 Subject: [PATCH] PEP8 updates. --- mayan/apps/checkouts/tests/test_views.py | 1 - mayan/apps/common/apps.py | 4 ++-- mayan/apps/common/management/commands/runtests.py | 7 +++++-- mayan/apps/common/tests/test_views.py | 1 - mayan/apps/document_states/tests/test_views.py | 2 -- mayan/apps/metadata/tests/test_views.py | 7 ++++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mayan/apps/checkouts/tests/test_views.py b/mayan/apps/checkouts/tests/test_views.py index 7e7cabdf7b..a8fe603424 100644 --- a/mayan/apps/checkouts/tests/test_views.py +++ b/mayan/apps/checkouts/tests/test_views.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals import datetime -import time from django.contrib.auth.models import User from django.core.files import File diff --git a/mayan/apps/common/apps.py b/mayan/apps/common/apps.py index f2b0850a36..5c0c51515d 100644 --- a/mayan/apps/common/apps.py +++ b/mayan/apps/common/apps.py @@ -1096,8 +1096,8 @@ THE SOFTWARE. level = 'INFO' loggers = {} - for app in apps.apps.get_app_configs(): - loggers[app.name] = { + for project_app in apps.apps.get_app_configs(): + loggers[project_app.name] = { 'handlers': ['console'], 'propagate': True, 'level': level, diff --git a/mayan/apps/common/management/commands/runtests.py b/mayan/apps/common/management/commands/runtests.py index 0e90518fe1..787155f06c 100644 --- a/mayan/apps/common/management/commands/runtests.py +++ b/mayan/apps/common/management/commands/runtests.py @@ -10,8 +10,11 @@ class Command(management.BaseCommand): help = 'Run all configured tests for the project.' option_list = management.BaseCommand.option_list + ( - make_option('--nomigrations', action='store_true', dest='nomigrations', default=False, - help='Don\'t use migrations when creating the test database.'), + make_option( + '--nomigrations', action='store_true', dest='nomigrations', + default=False, + help='Don\'t use migrations when creating the test database.' + ), ) def handle(self, *args, **options): diff --git a/mayan/apps/common/tests/test_views.py b/mayan/apps/common/tests/test_views.py index c3ce3f6ed4..ed57bce7d2 100644 --- a/mayan/apps/common/tests/test_views.py +++ b/mayan/apps/common/tests/test_views.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals from django.contrib.auth.models import User -from django.core.files import File from django.core.urlresolvers import reverse from django.test.client import Client from django.test import TestCase diff --git a/mayan/apps/document_states/tests/test_views.py b/mayan/apps/document_states/tests/test_views.py index ebacb6dd80..8146883f6f 100644 --- a/mayan/apps/document_states/tests/test_views.py +++ b/mayan/apps/document_states/tests/test_views.py @@ -5,9 +5,7 @@ from django.core.files import File from django.core.urlresolvers import reverse from django.test.client import Client from django.test import TestCase -from django.utils.timezone import now -from common.literals import TIME_DELTA_UNIT_DAYS from documents.models import DocumentType from documents.tests.literals import ( TEST_ADMIN_PASSWORD, TEST_ADMIN_USERNAME, TEST_ADMIN_EMAIL, diff --git a/mayan/apps/metadata/tests/test_views.py b/mayan/apps/metadata/tests/test_views.py index e4c624ae3c..00b1f26c2c 100644 --- a/mayan/apps/metadata/tests/test_views.py +++ b/mayan/apps/metadata/tests/test_views.py @@ -12,7 +12,7 @@ from documents.tests.literals import ( TEST_DOCUMENT_TYPE, TEST_SMALL_DOCUMENT_PATH ) -from ..models import MetadataType, DocumentMetadata +from ..models import MetadataType from .literals import ( TEST_DOCUMENT_TYPE_2, TEST_DOCUMENT_METADATA_VALUE_2, @@ -130,5 +130,6 @@ class DocumentMetadataTestCase(TestCase): self.assertContains(response, 'Metadata for document', status_code=200) self.assertEqual( - self.document.metadata.get(metadata_type=metadata_type_2 - ).value, TEST_DOCUMENT_METADATA_VALUE_2) + self.document.metadata.get(metadata_type=metadata_type_2).value, + TEST_DOCUMENT_METADATA_VALUE_2 + )