From 8af55ccbef19cdcab7efba941c32cfc4a37952da Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 30 Mar 2015 15:21:53 -0400 Subject: [PATCH] PEP8 cleanups --- mayan/apps/acls/__init__.py | 1 - mayan/apps/appearance/models.py | 2 -- mayan/apps/checkouts/__init__.py | 1 - mayan/apps/common/__init__.py | 1 - mayan/apps/converter/models.py | 3 --- mayan/apps/django_gpg/__init__.py | 1 - mayan/apps/django_gpg/apps.py | 1 + mayan/apps/document_acls/__init__.py | 1 - mayan/apps/document_acls/models.py | 3 --- mayan/apps/document_comments/__init__.py | 1 - mayan/apps/document_comments/apps.py | 1 + mayan/apps/document_comments/models.py | 3 --- mayan/apps/document_indexing/__init__.py | 1 - mayan/apps/document_indexing/admin.py | 5 +---- mayan/apps/document_signatures/__init__.py | 1 - mayan/apps/document_states/__init__.py | 1 - mayan/apps/documents/tasks.py | 1 - mayan/apps/dynamic_search/__init__.py | 1 - mayan/apps/events/__init__.py | 1 - mayan/apps/folders/__init__.py | 1 - mayan/apps/installation/__init__.py | 1 - mayan/apps/installation/apps.py | 3 --- mayan/apps/installation/models.py | 4 +--- mayan/apps/linking/__init__.py | 1 - mayan/apps/linking/apps.py | 1 + mayan/apps/mailer/__init__.py | 1 - mayan/apps/main/__init__.py | 1 - mayan/apps/main/models.py | 3 --- mayan/apps/metadata/__init__.py | 1 - mayan/apps/ocr/__init__.py | 1 - mayan/apps/permissions/__init__.py | 1 - mayan/apps/permissions/apps.py | 2 +- mayan/apps/project_setup/__init__.py | 1 - mayan/apps/project_setup/apps.py | 2 +- mayan/apps/project_tools/__init__.py | 5 ----- mayan/apps/project_tools/apps.py | 3 +-- mayan/apps/rest_api/__init__.py | 1 - mayan/apps/smart_settings/__init__.py | 1 - mayan/apps/smart_settings/models.py | 3 --- mayan/apps/sources/__init__.py | 1 - mayan/apps/statistics/__init__.py | 1 - mayan/apps/tags/__init__.py | 1 - mayan/apps/user_management/__init__.py | 1 - 43 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 mayan/apps/appearance/models.py delete mode 100644 mayan/apps/converter/models.py delete mode 100644 mayan/apps/document_acls/models.py delete mode 100644 mayan/apps/document_comments/models.py delete mode 100644 mayan/apps/main/models.py delete mode 100644 mayan/apps/smart_settings/models.py diff --git a/mayan/apps/acls/__init__.py b/mayan/apps/acls/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/acls/__init__.py +++ b/mayan/apps/acls/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/appearance/models.py b/mayan/apps/appearance/models.py deleted file mode 100644 index beeb308265..0000000000 --- a/mayan/apps/appearance/models.py +++ /dev/null @@ -1,2 +0,0 @@ -from django.db import models - diff --git a/mayan/apps/checkouts/__init__.py b/mayan/apps/checkouts/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/checkouts/__init__.py +++ b/mayan/apps/checkouts/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/common/__init__.py b/mayan/apps/common/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/common/__init__.py +++ b/mayan/apps/common/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/converter/models.py b/mayan/apps/converter/models.py deleted file mode 100644 index 71a8362390..0000000000 --- a/mayan/apps/converter/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/mayan/apps/django_gpg/__init__.py b/mayan/apps/django_gpg/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/django_gpg/__init__.py +++ b/mayan/apps/django_gpg/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/django_gpg/apps.py b/mayan/apps/django_gpg/apps.py index 47e2df61da..d197074517 100644 --- a/mayan/apps/django_gpg/apps.py +++ b/mayan/apps/django_gpg/apps.py @@ -13,6 +13,7 @@ from .links import ( key_delete, key_query, key_receive, key_setup, public_keys ) + class DjangoGPGApp(apps.AppConfig): name = 'django_gpg' verbose_name = _('Django GPG') diff --git a/mayan/apps/document_acls/__init__.py b/mayan/apps/document_acls/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/document_acls/__init__.py +++ b/mayan/apps/document_acls/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/document_acls/models.py b/mayan/apps/document_acls/models.py deleted file mode 100644 index 71a8362390..0000000000 --- a/mayan/apps/document_acls/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/mayan/apps/document_comments/__init__.py b/mayan/apps/document_comments/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/document_comments/__init__.py +++ b/mayan/apps/document_comments/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/document_comments/apps.py b/mayan/apps/document_comments/apps.py index d9d7ef0cf2..e9b212be1b 100644 --- a/mayan/apps/document_comments/apps.py +++ b/mayan/apps/document_comments/apps.py @@ -17,6 +17,7 @@ from .permissions import ( PERMISSION_COMMENT_VIEW ) + class DocumentCommentsApp(apps.AppConfig): name = 'document_comments' verbose_name = _('Document comments') diff --git a/mayan/apps/document_comments/models.py b/mayan/apps/document_comments/models.py deleted file mode 100644 index 71a8362390..0000000000 --- a/mayan/apps/document_comments/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/mayan/apps/document_indexing/__init__.py b/mayan/apps/document_indexing/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/document_indexing/__init__.py +++ b/mayan/apps/document_indexing/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/document_indexing/admin.py b/mayan/apps/document_indexing/admin.py index 4a1c4bf42f..d9cd4445f1 100644 --- a/mayan/apps/document_indexing/admin.py +++ b/mayan/apps/document_indexing/admin.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ -from .models import Index, IndexInstanceNode, IndexTemplateNode +from .models import Index, IndexTemplateNode class IndexTemplateNodeInline(admin.StackedInline): @@ -24,6 +24,3 @@ class IndexAdmin(admin.ModelAdmin): admin.site.register(Index, IndexAdmin) - - - diff --git a/mayan/apps/document_signatures/__init__.py b/mayan/apps/document_signatures/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/document_signatures/__init__.py +++ b/mayan/apps/document_signatures/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/document_states/__init__.py b/mayan/apps/document_states/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/document_states/__init__.py +++ b/mayan/apps/document_states/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/documents/tasks.py b/mayan/apps/documents/tasks.py index 2b501819d7..45e18b4cf5 100644 --- a/mayan/apps/documents/tasks.py +++ b/mayan/apps/documents/tasks.py @@ -8,7 +8,6 @@ from django.core.files import File from mayan.celery import app from common.models import SharedUploadedFile -from converter.exceptions import ConvertError from .models import Document, DocumentType, DocumentVersion diff --git a/mayan/apps/dynamic_search/__init__.py b/mayan/apps/dynamic_search/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/dynamic_search/__init__.py +++ b/mayan/apps/dynamic_search/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/events/__init__.py b/mayan/apps/events/__init__.py index 19ce5788d2..6a821ede7a 100644 --- a/mayan/apps/events/__init__.py +++ b/mayan/apps/events/__init__.py @@ -1,2 +1 @@ from .classes import Event # NOQA - diff --git a/mayan/apps/folders/__init__.py b/mayan/apps/folders/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/folders/__init__.py +++ b/mayan/apps/folders/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/installation/__init__.py b/mayan/apps/installation/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/installation/__init__.py +++ b/mayan/apps/installation/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/installation/apps.py b/mayan/apps/installation/apps.py index 9f98c1f6eb..ffc9cc6966 100644 --- a/mayan/apps/installation/apps.py +++ b/mayan/apps/installation/apps.py @@ -1,8 +1,6 @@ from __future__ import unicode_literals from django import apps -from django.db.utils import DatabaseError -from django.dispatch import receiver from django.utils.translation import ugettext_lazy as _ from common.utils import encapsulate @@ -11,7 +9,6 @@ from project_tools.api import register_tool from .classes import Property, PropertyNamespace from .links import link_menu_link, link_namespace_details, link_namespace_list -from .models import Installation class InstallationApp(apps.AppConfig): diff --git a/mayan/apps/installation/models.py b/mayan/apps/installation/models.py index ae950982fd..a0d3ce1ce0 100644 --- a/mayan/apps/installation/models.py +++ b/mayan/apps/installation/models.py @@ -23,13 +23,11 @@ from django.utils.translation import ugettext_lazy as _ from django.utils.datastructures import SortedDict from django.conf import settings -from solo.models import SingletonModel - from common.utils import pretty_size from mayan import __version__ as mayan_version from ocr.settings import PDFTOTEXT_PATH, TESSERACT_PATH, UNPAPER_PATH -from .classes import PIPNotFound, Property, PropertyNamespace, VirtualEnv +from .classes import PIPNotFound, PropertyNamespace, VirtualEnv class Installation(object): diff --git a/mayan/apps/linking/__init__.py b/mayan/apps/linking/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/linking/__init__.py +++ b/mayan/apps/linking/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/linking/apps.py b/mayan/apps/linking/apps.py index 66f28367aa..336f04c472 100644 --- a/mayan/apps/linking/apps.py +++ b/mayan/apps/linking/apps.py @@ -23,6 +23,7 @@ from .permissions import ( PERMISSION_SMART_LINK_VIEW ) + class LinkingApp(apps.AppConfig): name = 'linking' verbose_name = _('Linking') diff --git a/mayan/apps/mailer/__init__.py b/mayan/apps/mailer/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/mailer/__init__.py +++ b/mayan/apps/mailer/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/main/__init__.py b/mayan/apps/main/__init__.py index cfdc4b8b3f..212da1b862 100644 --- a/mayan/apps/main/__init__.py +++ b/mayan/apps/main/__init__.py @@ -1,2 +1 @@ from .classes import FrontPageButton # NOQA - diff --git a/mayan/apps/main/models.py b/mayan/apps/main/models.py deleted file mode 100644 index 71a8362390..0000000000 --- a/mayan/apps/main/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/mayan/apps/metadata/__init__.py b/mayan/apps/metadata/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/metadata/__init__.py +++ b/mayan/apps/metadata/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/ocr/__init__.py b/mayan/apps/ocr/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/ocr/__init__.py +++ b/mayan/apps/ocr/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/permissions/__init__.py b/mayan/apps/permissions/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/permissions/__init__.py +++ b/mayan/apps/permissions/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/permissions/apps.py b/mayan/apps/permissions/apps.py index 7e50715cc3..7e59bc0401 100644 --- a/mayan/apps/permissions/apps.py +++ b/mayan/apps/permissions/apps.py @@ -10,7 +10,7 @@ from navigation.api import register_links from project_setup.api import register_setup from rest_api.classes import APIEndPoint -from .models import Permission, Role +from .models import Role from .links import ( permission_grant, permission_revoke, role_create, role_delete, role_edit, role_list, role_members, role_permissions diff --git a/mayan/apps/project_setup/__init__.py b/mayan/apps/project_setup/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/project_setup/__init__.py +++ b/mayan/apps/project_setup/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/project_setup/apps.py b/mayan/apps/project_setup/apps.py index 77c72b6867..fcd0e1171f 100644 --- a/mayan/apps/project_setup/apps.py +++ b/mayan/apps/project_setup/apps.py @@ -13,4 +13,4 @@ class ProjectSetupApp(apps.AppConfig): verbose_name = _('Project setup') def ready(self): - setup_link = register_top_menu('setup_menu', link=link_setup, position=-2) + register_top_menu('setup_menu', link=link_setup, position=-2) diff --git a/mayan/apps/project_tools/__init__.py b/mayan/apps/project_tools/__init__.py index 3f2ff2d6cc..e69de29bb2 100644 --- a/mayan/apps/project_tools/__init__.py +++ b/mayan/apps/project_tools/__init__.py @@ -1,5 +0,0 @@ - - - - - diff --git a/mayan/apps/project_tools/apps.py b/mayan/apps/project_tools/apps.py index 13bf746f20..d007a12dc4 100644 --- a/mayan/apps/project_tools/apps.py +++ b/mayan/apps/project_tools/apps.py @@ -13,5 +13,4 @@ class ProjectToolsApp(apps.AppConfig): verbose_name = _('Project tools') def ready(self): - tool_link = register_top_menu('tools', link=link_tools, position=-3) - + register_top_menu('tools', link=link_tools, position=-3) diff --git a/mayan/apps/rest_api/__init__.py b/mayan/apps/rest_api/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/rest_api/__init__.py +++ b/mayan/apps/rest_api/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/smart_settings/__init__.py b/mayan/apps/smart_settings/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/smart_settings/__init__.py +++ b/mayan/apps/smart_settings/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/smart_settings/models.py b/mayan/apps/smart_settings/models.py deleted file mode 100644 index 71a8362390..0000000000 --- a/mayan/apps/smart_settings/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/mayan/apps/sources/__init__.py b/mayan/apps/sources/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/sources/__init__.py +++ b/mayan/apps/sources/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/statistics/__init__.py b/mayan/apps/statistics/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/statistics/__init__.py +++ b/mayan/apps/statistics/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/tags/__init__.py b/mayan/apps/tags/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/tags/__init__.py +++ b/mayan/apps/tags/__init__.py @@ -1 +0,0 @@ - diff --git a/mayan/apps/user_management/__init__.py b/mayan/apps/user_management/__init__.py index 8b13789179..e69de29bb2 100644 --- a/mayan/apps/user_management/__init__.py +++ b/mayan/apps/user_management/__init__.py @@ -1 +0,0 @@ -