Fix flake8 warnings.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
d8d6dada5e
commit
744976e8a1
@@ -5,7 +5,7 @@ import logging
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common import MayanAppConfig, menu_user
|
||||
from navigation.classes import Separator, Text
|
||||
from navigation.classes import Separator
|
||||
|
||||
from .links import link_logout, link_password_change
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ from django.utils.translation import ugettext_lazy as _, ungettext
|
||||
from acls.models import AccessControlList
|
||||
from common.views import (
|
||||
MultipleObjectFormActionView, SingleObjectCreateView,
|
||||
SingleObjectDeleteView, SingleObjectEditView, SingleObjectListView,
|
||||
TemplateView
|
||||
SingleObjectDeleteView, SingleObjectEditView, SingleObjectListView
|
||||
)
|
||||
from documents.permissions import permission_document_view
|
||||
from documents.models import Document
|
||||
|
||||
@@ -10,7 +10,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from acls import ModelPermission
|
||||
from common import MayanAppConfig, menu_facet, menu_main, menu_sidebar
|
||||
from common.classes import DashboardWidget
|
||||
from common.dashboards import dashboard_main
|
||||
from events import ModelEventType
|
||||
from mayan.celery import app
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django import forms
|
||||
from django.forms.utils import flatatt
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.html import conditional_escape, format_html
|
||||
from django.utils.html import format_html
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ from .widgets import (
|
||||
widget_document_version_page_number
|
||||
)
|
||||
|
||||
|
||||
class DocumentsApp(MayanAppConfig):
|
||||
has_tests = True
|
||||
name = 'documents'
|
||||
|
||||
@@ -168,7 +168,6 @@ class EventType(object):
|
||||
action=result, user=user
|
||||
)
|
||||
|
||||
|
||||
def get_stored_event_type(self):
|
||||
if not self.stored_event_type:
|
||||
StoredEventType = apps.get_model('events', 'StoredEventType')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
class MultiItemForm(forms.Form):
|
||||
|
||||
@@ -115,7 +115,6 @@ class LinkClassTestCase(GenericViewTestCase):
|
||||
|
||||
self.assertEqual(resolved_link.url, url.url)
|
||||
|
||||
|
||||
def test_link_with_querystring_preservation(self):
|
||||
previous_url = '{}?{}'.format(
|
||||
reverse(TEST_VIEW_NAME), TEST_QUERYSTRING_TWO_KEYS
|
||||
|
||||
@@ -5,7 +5,7 @@ from django.shortcuts import get_object_or_404
|
||||
from rest_framework import generics, status
|
||||
from rest_framework.response import Response
|
||||
|
||||
from documents.models import Document, DocumentPage, DocumentVersion
|
||||
from documents.models import Document, DocumentVersion
|
||||
from rest_api.permissions import MayanPermission
|
||||
|
||||
from .models import DocumentPageOCRContent
|
||||
|
||||
@@ -2,9 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
from rest_framework import generics
|
||||
|
||||
from rest_api.filters import MayanObjectPermissionsFilter
|
||||
from rest_api.permissions import MayanPermission
|
||||
|
||||
from .classes import APIResource
|
||||
from .serializers import APIResourceSerializer
|
||||
|
||||
@@ -14,5 +11,6 @@ class APIResourceTypeListView(generics.ListAPIView):
|
||||
Returns a list of all the available API resources.
|
||||
"""
|
||||
serializer_class = APIResourceSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
return APIResource.all()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.conf import settings
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.module_loading import import_string
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from rest_framework import renderers
|
||||
from rest_framework.authtoken.views import ObtainAuthToken
|
||||
from rest_framework_swagger.views import SwaggerApiView, SwaggerResourcesView
|
||||
from rest_framework_swagger.views import SwaggerResourcesView
|
||||
|
||||
|
||||
class APIBase(SwaggerResourcesView):
|
||||
|
||||
@@ -21,9 +21,9 @@ from .links import (
|
||||
link_user_set_password, link_user_setup
|
||||
)
|
||||
from .permissions import (
|
||||
permission_group_create, permission_group_delete, permission_group_edit,
|
||||
permission_group_view, permission_user_create, permission_user_delete,
|
||||
permission_user_edit, permission_user_view
|
||||
permission_group_delete, permission_group_edit,
|
||||
permission_group_view, permission_user_delete, permission_user_edit,
|
||||
permission_user_view
|
||||
)
|
||||
from .search import * # NOQA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user