flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import, we need to specify application-import-names. Previously flake8-import-check checks only standard imports or not. Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
This commit is contained in:
parent
40b76ff9fc
commit
af3b7e4134
@ -12,15 +12,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from horizon.test import helpers as test
|
||||
from horizon import views
|
||||
|
||||
from django import forms
|
||||
from django.test import client
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views import generic
|
||||
|
||||
from horizon.test import helpers as test
|
||||
from horizon import views
|
||||
|
||||
FAKENAME = "FakeName"
|
||||
|
||||
|
||||
|
@ -17,12 +17,11 @@ from django import shortcuts
|
||||
from django import template
|
||||
from django.utils import encoding
|
||||
from django.views import generic
|
||||
from osprofiler import profiler
|
||||
|
||||
import horizon
|
||||
from horizon import exceptions
|
||||
|
||||
from osprofiler import profiler
|
||||
|
||||
|
||||
class PageTitleMixin(object):
|
||||
"""A mixin that renders out a page title into a view.
|
||||
|
@ -20,12 +20,11 @@ from collections import Sequence
|
||||
import functools
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from horizon import exceptions
|
||||
|
||||
import semantic_version
|
||||
import six
|
||||
|
||||
from horizon import exceptions
|
||||
|
||||
|
||||
__all__ = ('APIResourceWrapper', 'APIDictWrapper',
|
||||
'get_service_from_catalog', 'url_for',)
|
||||
|
@ -17,11 +17,10 @@ from collections import OrderedDict
|
||||
from django.utils import http as utils_http
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views import generic
|
||||
from novaclient import exceptions
|
||||
|
||||
from horizon import exceptions as hz_exceptions
|
||||
|
||||
from novaclient import exceptions
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.api.rest import json_encoder
|
||||
from openstack_dashboard.api.rest import urls
|
||||
|
@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.contrib.developer.form_builder import views
|
||||
|
||||
urlpatterns = [
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
|
||||
urlpatterns = [
|
||||
|
@ -12,14 +12,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from openstack_auth import utils
|
||||
|
||||
import horizon
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Admin(horizon.Dashboard):
|
||||
name = _("Admin")
|
||||
|
@ -15,15 +15,13 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
from mox3.mox import IsA
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.test import helpers as test
|
||||
|
||||
from novaclient.v2 import flavors
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.dashboards.admin.flavors import constants
|
||||
from openstack_dashboard.dashboards.admin.flavors import tables
|
||||
from openstack_dashboard.dashboards.admin.flavors import workflows
|
||||
from openstack_dashboard.test import helpers as test
|
||||
|
||||
|
||||
class FlavorsViewTests(test.BaseAdminViewTests):
|
||||
|
@ -19,6 +19,7 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.admin.flavors import views
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.admin.images import views
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
|
||||
from openstack_dashboard.dashboards.identity.roles import views
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.dashboards.project.api_access import views
|
||||
|
||||
urlpatterns = [
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.project.images.images import views
|
||||
|
||||
|
@ -20,6 +20,7 @@ from django.conf import settings
|
||||
from django.conf.urls import include
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.project.images.images \
|
||||
import urls as image_urls
|
||||
|
@ -16,11 +16,10 @@ import logging
|
||||
|
||||
from django.utils.http import urlencode
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from novaclient import exceptions as nova_exception
|
||||
|
||||
from horizon import exceptions
|
||||
|
||||
from novaclient import exceptions as nova_exception
|
||||
|
||||
from openstack_dashboard import api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -16,12 +16,11 @@ from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
from django.utils.html import escape
|
||||
from django.utils.http import urlunquote
|
||||
|
||||
from horizon.workflows import views
|
||||
|
||||
from mox3.mox import IsA
|
||||
import six
|
||||
|
||||
from horizon.workflows import views
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.dashboards.project.networks import tables\
|
||||
as networks_tables
|
||||
|
@ -17,13 +17,12 @@ import logging
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from neutronclient.common import exceptions as neutron_exc
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
|
||||
from neutronclient.common import exceptions as neutron_exc
|
||||
|
||||
from openstack_dashboard.api import neutron as api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
|
@ -16,9 +16,9 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
import six
|
||||
|
||||
from horizon import tables
|
||||
import six
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard import policy
|
||||
|
@ -17,6 +17,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.dashboards.project.security_groups import views
|
||||
|
||||
urlpatterns = [
|
||||
|
@ -22,14 +22,13 @@ Views for managing instances.
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from neutronclient.common import exceptions as neutron_exc
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import tables
|
||||
from horizon.utils import memoized
|
||||
|
||||
from neutronclient.common import exceptions as neutron_exc
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.dashboards.project.security_groups \
|
||||
import forms as project_forms
|
||||
|
@ -16,14 +16,13 @@ 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
|
||||
from heatclient import exc
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import messages
|
||||
from horizon import tables
|
||||
from horizon.utils import filters
|
||||
|
||||
from heatclient import exc
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.dashboards.project.stacks import mappings
|
||||
|
||||
|
@ -20,18 +20,16 @@ from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import html
|
||||
|
||||
from heatclient.common import template_format as hc_format
|
||||
from mox3.mox import IsA
|
||||
import six
|
||||
|
||||
from heatclient.common import template_format as hc_format
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.test import helpers as test
|
||||
|
||||
from openstack_dashboard.dashboards.project.stacks import api as project_api
|
||||
from openstack_dashboard.dashboards.project.stacks import forms
|
||||
from openstack_dashboard.dashboards.project.stacks import mappings
|
||||
from openstack_dashboard.dashboards.project.stacks import tables
|
||||
from openstack_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_TEMPLATE = 'horizon/common/_data_table_view.html'
|
||||
|
@ -10,13 +10,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from selenium.webdriver.common import by
|
||||
|
||||
from openstack_dashboard.test.integration_tests.pages import basepage
|
||||
from openstack_dashboard.test.integration_tests.regions import forms
|
||||
from openstack_dashboard.test.integration_tests.regions import menus
|
||||
from openstack_dashboard.test.integration_tests.regions import tables
|
||||
|
||||
from selenium.webdriver.common import by
|
||||
|
||||
|
||||
class FlavorsTable(tables.TableRegion):
|
||||
name = "flavors"
|
||||
|
3
tox.ini
3
tox.ini
@ -143,7 +143,10 @@ ignore =
|
||||
# H904 Delay string interpolations at logging calls
|
||||
enable-extensions=H203,H904
|
||||
max-complexity = 20
|
||||
|
||||
# flake8-import-order configurations
|
||||
import-order-style = pep8
|
||||
application-import-names = horizon,openstack_dashboard
|
||||
|
||||
[hacking]
|
||||
local-check-factory = horizon.hacking.checks.factory
|
||||
|
Loading…
Reference in New Issue
Block a user