hacking: noqa cleanup in openstack_dashboard

attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
This commit is contained in:
Akihiro Motoki 2017-03-17 19:15:23 +00:00
parent 61091388e9
commit baa4ca8dce
115 changed files with 231 additions and 189 deletions

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from collections import Sequence # noqa
from collections import Sequence
import functools
from django.conf import settings

View File

@ -31,8 +31,8 @@ from cinderclient.v2.contrib import list_extensions as cinder_list_extensions
from horizon import exceptions
from horizon.utils import functions as utils
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized_with_request # noqa
from horizon.utils.memoized import memoized
from horizon.utils.memoized import memoized_with_request
from openstack_dashboard.api import base
from openstack_dashboard.api import nova

View File

@ -34,7 +34,7 @@ import six
from six.moves import _thread as thread
from horizon.utils import functions as utils
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard.api import base
from openstack_dashboard.contrib.developer.profiler import api as profiler

View File

@ -23,7 +23,7 @@ from heatclient.common import template_utils
from heatclient.common import utils as heat_utils
from horizon import exceptions
from horizon.utils import functions as utils
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard.api import base
from openstack_dashboard.contrib.developer.profiler import api as profiler

View File

@ -33,7 +33,7 @@ import six
from horizon import exceptions
from horizon import messages
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard.api import base
from openstack_dashboard.api import network_base
from openstack_dashboard.api import nova

View File

@ -24,7 +24,7 @@ import collections
import logging
from django.conf import settings
from django.utils.functional import cached_property # noqa
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
import six
@ -39,8 +39,8 @@ from novaclient.v2 import servers as nova_servers
from horizon import conf
from horizon import exceptions as horizon_exceptions
from horizon.utils import functions as utils
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized_with_request # noqa
from horizon.utils.memoized import memoized
from horizon.utils.memoized import memoized_with_request
from openstack_dashboard.api import base
from openstack_dashboard.api import network_base
@ -114,8 +114,8 @@ class Server(base.APIResourceWrapper):
# TODO(gabriel): deprecate making a call to Glance as a fallback.
@property
def image_name(self):
import glanceclient.exc as glance_exceptions # noqa
from openstack_dashboard.api import glance # noqa
import glanceclient.exc as glance_exceptions
from openstack_dashboard.api import glance
if not self.image:
return _("-")

View File

@ -21,14 +21,27 @@ It does not promise to adhere to the general OpenStack API Guidelines set out
in https://wiki.openstack.org/wiki/APIChangeGuidelines.
"""
# import REST API modules here
from . import cinder # noqa
from . import config # noqa
from . import glance # noqa
from . import heat # noqa
from . import keystone # noqa
from . import network # noqa
from . import neutron # noqa
from . import nova # noqa
from . import policy # noqa
from . import swift # noqa
from openstack_dashboard.api.rest import cinder
from openstack_dashboard.api.rest import config
from openstack_dashboard.api.rest import glance
from openstack_dashboard.api.rest import heat
from openstack_dashboard.api.rest import keystone
from openstack_dashboard.api.rest import network
from openstack_dashboard.api.rest import neutron
from openstack_dashboard.api.rest import nova
from openstack_dashboard.api.rest import policy
from openstack_dashboard.api.rest import swift
__all__ = [
'cinder',
'config',
'glance',
'heat',
'keystone',
'network',
'neutron',
'nova',
'policy',
'swift',
]

View File

@ -135,7 +135,7 @@ class Images(generic.View):
an image.
Example GET:
http://localhost/api/glance/images?sort_dir=desc&sort_key=name&name=cirros-0.3.2-x86_64-uec # noqa
http://localhost/api/glance/images?sort_dir=desc&sort_key=name&name=cirros-0.3.2-x86_64-uec
The following get parameters may be passed in the GET
request:
@ -249,7 +249,7 @@ class MetadefsNamespaces(generic.View):
a namespace.
Example GET:
http://localhost/api/glance/metadefs/namespaces?resource_types=OS::Nova::Flavor&sort_dir=desc&marker=OS::Compute::Watchdog&paginate=False&sort_key=namespace # noqa
http://localhost/api/glance/metadefs/namespaces?resource_types=OS::Nova::Flavor&sort_dir=desc&marker=OS::Compute::Watchdog&paginate=False&sort_key=namespace
The following get parameters may be passed in the GET
request:

View File

@ -16,7 +16,7 @@ from __future__ import absolute_import
from collections import OrderedDict
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard.api import neutron
from openstack_dashboard.contrib.developer.profiler import api as profiler

View File

@ -17,4 +17,5 @@ PANEL = 'resource_browser'
PANEL_GROUP = 'default'
PANEL_DASHBOARD = 'developer'
ADD_PANEL = 'openstack_dashboard.contrib.developer.resource_browser.panel.ResourceBrowser' # noqa
ADD_PANEL = ('openstack_dashboard.contrib.developer.resource_browser.panel.'
'ResourceBrowser')

View File

@ -15,7 +15,7 @@ import mock
from django.core.urlresolvers import reverse
from django import http
from django.utils import html
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.aggregates import constants

View File

@ -14,7 +14,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -14,7 +14,7 @@ import django
from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -12,7 +12,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -14,7 +14,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -14,8 +14,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -14,7 +14,7 @@
# under the License.
from django.core import urlresolvers
from django.template.defaultfilters import title # noqa
from django.template.defaultfilters import title
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

View File

@ -18,7 +18,7 @@ import uuid
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -19,7 +19,7 @@ Forms for managing metadata.
import json
from django.core.urlresolvers import reverse
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

View File

@ -19,7 +19,7 @@ import json
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from openstack_dashboard import api

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url # noqa
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.metadata_defs import views

View File

@ -16,7 +16,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -16,7 +16,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon.workflows import views

View File

@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon import forms

View File

@ -24,7 +24,7 @@ from django.test.utils import override_settings
from django.utils import encoding
from django.utils import timezone
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon.templatetags import sizeformat

View File

@ -17,7 +17,7 @@
# under the License.
from django.conf import settings
from django.template.defaultfilters import floatformat # noqa
from django.template.defaultfilters import floatformat
from django.utils import translation
from django.utils.translation import ugettext_lazy as _

View File

@ -15,8 +15,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.routers import tests as r_test

View File

@ -15,7 +15,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard.api import cinder
from openstack_dashboard.api import keystone

View File

@ -13,7 +13,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -11,7 +11,7 @@
# under the License.
from django.core.urlresolvers import reverse
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

View File

@ -13,7 +13,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -16,7 +16,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import tables
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.volume_types.qos_specs \

View File

@ -12,7 +12,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon import exceptions

View File

@ -19,7 +19,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.api import cinder

View File

@ -16,8 +16,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from horizon.workflows import views

View File

@ -15,8 +15,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -15,8 +15,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -15,8 +15,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -17,8 +17,8 @@ import json
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -23,8 +23,8 @@ from django import http
from django.test.utils import override_settings
from django.utils import timezone
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from horizon.workflows import views

View File

@ -15,8 +15,8 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -20,10 +20,10 @@ import collections
import logging
from django.conf import settings
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django import http
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from horizon import exceptions
from horizon import forms

View File

@ -16,15 +16,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from socket import timeout as socket_timeout # noqa
from socket import timeout as socket_timeout
import django
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -22,9 +22,9 @@ import operator
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.utils.decorators import method_decorator # noqa
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_post_parameters # noqa
from django.views.decorators.debug import sensitive_post_parameters
from horizon import exceptions
from horizon import forms

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.template.defaultfilters import title # noqa
from django.template.defaultfilters import title
from django.utils.translation import ugettext_lazy as _
from openstack_auth import utils

View File

@ -15,10 +15,10 @@
import six
from django.core.urlresolvers import reverse
from django.http import HttpRequest # noqa
from django.test.utils import override_settings # noqa
from django.http import HttpRequest
from django.test.utils import override_settings
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from contextlib import closing # noqa
from contextlib import closing
import logging
import tempfile
import zipfile

View File

@ -16,7 +16,7 @@ from django import http
from django.test.utils import override_settings
from django.utils.http import urlencode
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.backups \

View File

@ -12,7 +12,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard.api import cinder
from openstack_dashboard.test import helpers as test

View File

@ -13,7 +13,7 @@
from django.core.urlresolvers import reverse
from django import http
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard.api import cinder
from openstack_dashboard.test import helpers as test

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from django.core.urlresolvers import reverse
from django import http

View File

@ -19,7 +19,7 @@ from django.core.urlresolvers import reverse
from django import shortcuts
from django.utils.http import urlencode
from django.utils.translation import pgettext_lazy
from django.utils.translation import string_concat # noqa
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

View File

@ -21,7 +21,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.utils.http import urlencode
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from openstack_dashboard import api

View File

@ -22,8 +22,8 @@ Views for managing images.
from django.conf import settings
from django.core import validators
from django.forms import ValidationError # noqa
from django.forms.widgets import HiddenInput # noqa
from django.forms import ValidationError
from django.forms.widgets import HiddenInput
from django.template import defaultfilters
from django.utils.translation import ugettext_lazy as _
import six

View File

@ -23,7 +23,7 @@ from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from horizon import tables
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard import api

View File

@ -19,13 +19,13 @@
import tempfile
from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile # noqa
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.core.urlresolvers import reverse
from django.forms.widgets import HiddenInput # noqa
from django.forms.widgets import HiddenInput
from django import http
from django.test.utils import override_settings
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon import tables as horizon_tables
from openstack_dashboard import api

View File

@ -19,7 +19,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -18,7 +18,7 @@
# under the License.
import os
from socket import timeout as socket_timeout # noqa
from socket import timeout as socket_timeout
import unittest
from django.core.urlresolvers import reverse
@ -26,7 +26,7 @@ from django import http
from glanceclient.common import exceptions as glance_exec
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from horizon import exceptions

View File

@ -14,9 +14,9 @@
# under the License.
from django.core.urlresolvers import reverse
from django.template.defaultfilters import filesizeformat # noqa
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from horizon import exceptions
from horizon import forms

View File

@ -17,14 +17,14 @@ import logging
from django.conf import settings
from django.core import urlresolvers
from django.http import HttpResponse # noqa
from django.http import HttpResponse
from django import shortcuts
from django import template
from django.template.defaultfilters import title # noqa
from django.template.defaultfilters import title
from django.utils.http import urlencode
from django.utils.translation import npgettext_lazy
from django.utils.translation import pgettext_lazy
from django.utils.translation import string_concat # noqa
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

View File

@ -23,15 +23,15 @@ import sys
import django
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME # noqa
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.urlresolvers import reverse
from django.forms import widgets
from django import http
import django.test
from django.test.utils import override_settings
from django.utils.http import urlencode
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
import six
from horizon import exceptions

View File

@ -1,5 +1,24 @@
# Importing non-modules that are not used explicitly
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from .create_instance import LaunchInstance # noqa
from .resize_instance import ResizeInstance # noqa
from .update_instance import UpdateInstance # noqa
from openstack_dashboard.dashboards.project.instances.workflows.\
create_instance import LaunchInstance
from openstack_dashboard.dashboards.project.instances.workflows.\
resize_instance import ResizeInstance
from openstack_dashboard.dashboards.project.instances.workflows.\
update_instance import UpdateInstance
__all__ = [
'LaunchInstance',
'ResizeInstance',
'UpdateInstance',
]

View File

@ -23,10 +23,10 @@ import operator
from oslo_utils import units
import six
from django.template.defaultfilters import filesizeformat # noqa
from django.utils.text import normalize_newlines # noqa
from django.template.defaultfilters import filesizeformat
from django.utils.text import normalize_newlines
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from horizon import exceptions
from horizon import forms

View File

@ -16,7 +16,7 @@
import json
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from horizon import exceptions
from horizon import forms

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django import http
from django.template.defaultfilters import slugify # noqa
from django.template.defaultfilters import slugify
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.cache import cache_control

View File

@ -16,7 +16,7 @@ from django.core.urlresolvers import reverse
from django import http
import django.test
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from oslo_serialization import jsonutils
from openstack_dashboard import api

View File

@ -21,9 +21,9 @@ import json
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponse # noqa
from django.http import HttpResponse
from django.utils.translation import ugettext_lazy as _
from django.views.generic import View # noqa
from django.views.generic import View
from horizon import exceptions
from horizon import tabs

View File

@ -18,7 +18,7 @@ import copy
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon.workflows import views

View File

@ -19,7 +19,7 @@ from django.utils.http import urlunquote
from horizon.workflows import views
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from openstack_dashboard import api

View File

@ -20,13 +20,13 @@ import datetime
import logging
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME # noqa
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.utils import timezone
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -17,8 +17,8 @@
# under the License.
from django.template.defaultfilters import capfirst # noqa
from django.template.defaultfilters import floatformat # noqa
from django.template.defaultfilters import capfirst
from django.template.defaultfilters import floatformat
from django.utils.translation import ugettext_lazy as _
from horizon.utils import csvbase

View File

@ -17,8 +17,8 @@ import django
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa
from mox3.mox import IgnoreArg
from mox3.mox import IsA
import six
from openstack_dashboard import api

View File

@ -20,7 +20,7 @@ import netaddr
from django.conf import settings
from django.core.urlresolvers import reverse
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
import six

View File

@ -24,7 +24,7 @@ from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from horizon import exceptions
from horizon import forms

View File

@ -21,7 +21,7 @@ from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.api import cinder

View File

@ -17,7 +17,7 @@ import django
from django.conf import settings
from django.utils import html
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from oslo_utils import strutils
import six

View File

@ -15,7 +15,7 @@ import logging
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template.defaultfilters import register # noqa
from django.template.defaultfilters import register
from django.utils import html
from django.utils import safestring
import six

View File

@ -14,7 +14,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.template.defaultfilters import title # noqa
from django.template.defaultfilters import title
from django.template.loader import render_to_string
from horizon.utils import filters

View File

@ -11,8 +11,8 @@
# under the License.
from django.core import urlresolvers
from django.http import Http404 # noqa
from django.template.defaultfilters import title # noqa
from django.http import Http404
from django.template.defaultfilters import title
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

View File

@ -14,7 +14,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -18,10 +18,10 @@ from django.conf import settings
from django.core import exceptions
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings # noqa
from django.test.utils import override_settings
from django.utils import html
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from heatclient.common import template_format as hc_format

View File

@ -17,7 +17,7 @@ import yaml
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponse # noqa
from django.http import HttpResponse
from django.utils.translation import ugettext_lazy as _
import django.views.generic

View File

@ -19,9 +19,9 @@ Views for managing volumes.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django import http
from django.template.defaultfilters import filesizeformat # noqa
from django.template.defaultfilters import filesizeformat
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
@ -29,7 +29,7 @@ from horizon import exceptions
from horizon import forms
from horizon import messages
from horizon.utils import functions
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized
from openstack_dashboard import api
from openstack_dashboard.api import cinder

View File

@ -13,16 +13,16 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import NoReverseMatch # noqa
from django.core.urlresolvers import NoReverseMatch
from django.core.urlresolvers import reverse
from django.http import HttpResponse # noqa
from django.http import HttpResponse
from django.template import defaultfilters as filters
from django.utils import html
from django.utils.http import urlencode
from django.utils import safestring
from django.utils.translation import npgettext_lazy
from django.utils.translation import pgettext_lazy
from django.utils.translation import string_concat # noqa
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

View File

@ -21,11 +21,11 @@ from django.conf import settings
from django.core.urlresolvers import reverse
from django.forms import widgets
from django import http
from django.template.defaultfilters import slugify # noqa
from django.template.defaultfilters import slugify
from django.test.utils import override_settings
from django.utils.http import urlunquote
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.api import cinder

View File

@ -22,7 +22,7 @@ import json
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django import http
from django.template.defaultfilters import slugify # noqa
from django.template.defaultfilters import slugify
from django.utils.decorators import method_decorator
from django.utils import encoding
from django.utils.translation import ugettext_lazy as _

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from django.core.urlresolvers import reverse
from django import http

View File

@ -13,10 +13,10 @@
# under the License.
from django.conf import settings
from django.forms import ValidationError # noqa
from django.forms import ValidationError
from django import http
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables # noqa
from django.views.decorators.debug import sensitive_variables
from horizon import exceptions
from horizon import forms

View File

@ -15,9 +15,9 @@
from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from django.utils.six.moves.urllib.parse import urlsplit # noqa
from django.utils.six.moves.urllib.parse import urlsplit
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from datetime import datetime # noqa
from datetime import datetime
import string
import babel

View File

@ -21,8 +21,8 @@ import sys
import warnings
from django.conf import settings
from django.core.management.base import BaseCommand # noqa
from django.template import Context, Template # noqa
from django.core.management import base
from django import template
# Suppress DeprecationWarnings which clutter the output to the point of
# rendering it unreadable.
@ -65,7 +65,7 @@ def _getattr(obj, name, default):
return default
context = Context({
context = template.Context({
'DJANGO_SETTINGS_MODULE': os.environ['DJANGO_SETTINGS_MODULE'],
'HOSTNAME': socket.getfqdn(),
'PROJECT_PATH': os.path.realpath(
@ -136,7 +136,7 @@ def find_apache_log_dir():
context['LOGDIR'] = find_apache_log_dir()
class Command(BaseCommand):
class Command(base.BaseCommand):
args = ''
help = """Create %(wsgi_file)s
@ -301,7 +301,7 @@ location you desire, e.g.::
with open(
os.path.join(CURDIR, 'horizon.wsgi.template'), 'r'
) as fp:
wsgi_template = Template(fp.read())
wsgi_template = template.Template(fp.read())
if not os.path.exists(context['WSGI_FILE']) or force:
with open(context['WSGI_FILE'], 'w') as fp:
fp.write(wsgi_template.render(context))
@ -315,7 +315,7 @@ location you desire, e.g.::
with open(
os.path.join(CURDIR, 'apache_vhost.conf.template'), 'r'
) as fp:
wsgi_template = Template(fp.read())
wsgi_template = template.Template(fp.read())
sys.stdout.write(wsgi_template.render(context))
else:
self.print_help('manage.py', cmd_name)

View File

@ -21,7 +21,7 @@ import sys
import time
import warnings
from django.core.management.templates import BaseCommand # noqa
from django.core.management.templates import BaseCommand
# Suppress DeprecationWarnings which clutter the output to the point of
# rendering it unreadable.

View File

@ -15,7 +15,7 @@
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from neutronclient.v2_0.client import Client as neutronclient # noqa
from neutronclient.v2_0.client import Client as neutronclient
class FwaasApiTests(test.APITestCase):

View File

@ -12,7 +12,7 @@
import six
from django.conf import settings
from django.test.utils import override_settings # noqa
from django.test.utils import override_settings
from horizon import exceptions
from openstack_dashboard import api

View File

@ -17,7 +17,7 @@ import copy
from django import http
from django.test.utils import override_settings
from mox3.mox import IsA # noqa
from mox3.mox import IsA
import six
from oslo_utils import uuidutils

Some files were not shown because too many files have changed in this diff Show More