Enabled hacking checks H305 and H307

* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: Icae1c85b4bd7f8f58ca9e0db5bed20de1be02897
This commit is contained in:
Christian Berendt 2014-07-17 18:14:44 +02:00
parent 16f64cc849
commit 1bc3465a8b
49 changed files with 33 additions and 79 deletions

View File

@ -16,9 +16,9 @@
import logging
from horizon import exceptions
from saharaclient.api import base as api_base
from saharaclient import client as api_client
from saharadashboard.utils import importutils

View File

@ -16,8 +16,8 @@
from django.utils.translation import ugettext_lazy as _
from horizon import forms
from horizon import messages
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.utils import workflow_helpers

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -19,7 +19,6 @@ from django.core import urlresolvers
from django import template
from django.utils import http
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient

View File

@ -13,16 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import logging
from django.utils.translation import ugettext as _
import json
from horizon import exceptions
from horizon import forms
from horizon import workflows
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.api import helpers as helpers
from saharadashboard.utils import anti_affinity as aa

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -19,7 +19,6 @@ from django.http import Http404 # noqa
from django.utils.translation import ugettext_lazy as _
from horizon import messages
from horizon import tables
from saharaclient.api import base as api_base
from saharadashboard.api.client import client as saharaclient

View File

@ -16,10 +16,10 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from horizon import tabs
from saharadashboard.api.client import client as saharaclient
from saharadashboard.utils import compatibility
from saharadashboard.utils import importutils
from saharadashboard.utils import workflow_helpers as helpers
@ -32,9 +32,6 @@ nova = importutils.import_any('openstack_dashboard.api.nova',
glance = importutils.import_any('openstack_dashboard.api.glance',
'horizon.api.glance')
from saharadashboard.api.client import client as saharaclient
LOG = logging.getLogger(__name__)

View File

@ -20,7 +20,6 @@ from horizon import tabs
from horizon import workflows
from saharadashboard.api.client import client as saharaclient
from saharadashboard.clusters.tables import ClustersTable
import saharadashboard.clusters.tabs as _tabs
import saharadashboard.clusters.workflows.create as create_flow

View File

@ -13,10 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from django.utils.translation import ugettext as _
from horizon import exceptions
from horizon import forms
from horizon import workflows
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.api.client import SAHARA_USE_NEUTRON
import saharadashboard.cluster_templates.workflows.create as t_flows
from saharadashboard.utils import importutils
from saharadashboard.utils import neutron_support
import saharadashboard.utils.workflow_helpers as whelpers
@ -29,15 +36,6 @@ neutron = importutils.import_any('openstack_dashboard.api.quantum',
nova = importutils.import_any('openstack_dashboard.api.nova',
'horizon.api.nova')
from django.utils.translation import ugettext as _
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.api.client import SAHARA_USE_NEUTRON
import saharadashboard.cluster_templates.workflows.create as t_flows
import logging
LOG = logging.getLogger(__name__)
KEYPAIR_IMPORT_URL = "horizon:project:access_and_security:keypairs:import"

View File

@ -18,10 +18,9 @@ import logging
from django.utils.translation import ugettext as _
from horizon import exceptions
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.api import client as saharaclient
import saharadashboard.cluster_templates.workflows.create as clt_create_flow
import saharadashboard.clusters.workflows.create as cl_create_flow
import saharadashboard.utils.workflow_helpers as whelpers

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient

View File

@ -20,7 +20,6 @@ from horizon import tabs
from horizon import workflows
from saharadashboard.api.client import client as saharaclient
from saharadashboard.data_sources.tables import DataSourcesTable
import saharadashboard.data_sources.tabs as _tabs
import saharadashboard.data_sources.workflows.create as create_flow

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext as _
from horizon import forms
from horizon import workflows

View File

@ -19,8 +19,8 @@ from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import messages
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.utils import importutils

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -17,7 +17,6 @@ import logging
from django import template
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient

View File

@ -14,24 +14,21 @@
# limitations under the License.
import logging
import uuid
from django.forms.util import flatatt
from django.forms import widgets
from django import template
from django.template.defaultfilters import linebreaks
from django.template.defaultfilters import safe
from django.utils.encoding import force_unicode
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from horizon import forms
from horizon import messages
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
import uuid
from saharadashboard.api import client as saharaclient
LOG = logging.getLogger(__name__)

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -16,10 +16,9 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient

View File

@ -21,14 +21,12 @@ from django import http
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from django.views.generic import View
from horizon import exceptions
from horizon import forms
from horizon import tables
from horizon import tabs
from saharadashboard.api.client import client as saharaclient
import saharadashboard.job_binaries.forms as job_binary_forms
from saharadashboard.job_binaries.tables import JobBinariesTable
import saharadashboard.job_binaries.tabs as _tabs

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -18,7 +18,6 @@ import logging
from django.core import urlresolvers
from django.utils import http
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient

View File

@ -19,7 +19,6 @@ from horizon import tables
from horizon import tabs
from saharadashboard.api.client import client as saharaclient
from saharadashboard.job_executions.tables import JobExecutionsTable
import saharadashboard.job_executions.tabs as _tabs

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -18,7 +18,6 @@ import logging
from django.core import urlresolvers
from django.utils import http
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient

View File

@ -12,17 +12,16 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from django.http import HttpResponse
import json
import logging
from django.http import HttpResponse
from horizon import tables
from horizon import tabs
from horizon import workflows
from saharadashboard.api.client import client as saharaclient
import saharadashboard.jobs.tables as _tables
import saharadashboard.jobs.tabs as _tabs
import saharadashboard.jobs.workflows.create as create_flow

View File

@ -17,7 +17,6 @@ import json
import logging
from django.utils.translation import ugettext as _
from horizon import forms
from horizon import workflows

View File

@ -17,7 +17,6 @@ import json
import logging
from django.utils.translation import ugettext as _
from horizon import forms
from horizon import workflows

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -12,13 +12,13 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from django import template
import logging
from django import template
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from saharadashboard.api.client import client as saharaclient
LOG = logging.getLogger(__name__)

View File

@ -20,7 +20,6 @@ from horizon import tabs
from horizon import workflows
from saharadashboard.api.client import client as saharaclient
import saharadashboard.nodegroup_templates.tables as _tables
import saharadashboard.nodegroup_templates.tabs as _tabs
import saharadashboard.nodegroup_templates.workflows.copy as copy_flow

View File

@ -13,19 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from horizon import forms
import logging
from django.utils.translation import ugettext as _
from horizon import exceptions
from horizon import forms
from horizon import workflows
from saharaclient.api import base as api_base
from saharadashboard.api import client as saharaclient
from saharadashboard.utils import importutils
from saharadashboard.api import client as saharaclient
import saharadashboard.api.helpers as helpers
from saharadashboard.utils import importutils
import saharadashboard.utils.workflow_helpers as whelpers

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import horizon
from saharadashboard import dashboard

View File

@ -12,12 +12,11 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from django import template
import logging
from django import template
from django.utils.translation import ugettext_lazy as _
from horizon import tables
LOG = logging.getLogger(__name__)

View File

@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.utils.translation import ugettext_lazy as _
import logging
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
from saharadashboard.api.client import client as saharaclient
LOG = logging.getLogger(__name__)

View File

@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from horizon import tables
from horizon import tabs
import logging
from saharadashboard.api.client import client as saharaclient
from saharadashboard.plugins.tables import PluginsTable

View File

@ -15,10 +15,10 @@
import random
import string
from testtools import testcase
import traceback
import unittest2
from testtools import testcase
import unittest2
from saharadashboard.tests import base
import saharadashboard.tests.configs.config as cfg

View File

@ -14,6 +14,7 @@
# limitations under the License.
import os
from oslo.config import cfg
common_group = cfg.OptGroup(name='common', title="common configs")

View File

@ -16,7 +16,6 @@
import logging
from django.utils.translation import ugettext as _
from horizon import forms
from saharadashboard.api.client import client as saharaclient

View File

@ -15,6 +15,7 @@
from django.utils.translation import ugettext as _
from horizon import exceptions
from saharadashboard.utils import importutils
neutron = importutils.import_any('openstack_dashboard.api.quantum',

View File

@ -14,7 +14,6 @@
# limitations under the License.
from django.utils.translation import ugettext as _
from horizon import forms
from horizon import workflows

View File

@ -31,10 +31,8 @@ commands = {posargs}
# E226 missing whitespace around arithmetic operator
# E251 unexpected spaces around keyword / parameter equals
# E265 block comment should start with '# '
# H305 imports not grouped correctly (re: stdlib, six: third-party)
# H307 like imports should be grouped together (six and oslo.config.cfg from third-party are separated by whitespace)
# H904 Wrap long lines in parentheses instead of a backslash
ignore = E226,E251,E265,H305,H307,H904
ignore = E226,E251,E265,H904
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,horizon