From 0be3c0e99786a8ad250484748f4af9c6b07ae191 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Thu, 23 May 2013 15:36:48 -0500 Subject: [PATCH] imports not in alphabetical order (flake8 H306) Change-Id: I0f6c5fc27b0bb2da553e9345a8ac4949ce46e685 --- bin/keystone-all | 4 ++-- httpd/keystone.py | 2 +- keystone/auth/controllers.py | 4 ++-- keystone/auth/core.py | 2 +- keystone/auth/plugins/password.py | 3 +-- keystone/auth/plugins/token.py | 3 +-- keystone/auth/token_factory.py | 6 +++--- keystone/common/sql/core.py | 2 +- keystone/common/sql/legacy.py | 2 +- .../sql/migrate_repo/versions/008_create_default_domain.py | 1 + .../sql/migrate_repo/versions/016_normalize_domain_ids.py | 1 + .../versions/023_drop_credential_constraints.py | 3 +-- keystone/common/sql/nova.py | 2 +- keystone/controllers.py | 3 ++- keystone/policy/backends/rules.py | 2 +- keystone/service.py | 4 ++-- keystone/trust/backends/kvs.py | 3 +-- keystone/trust/controllers.py | 6 +++--- tests/test_backend_kvs.py | 1 + tests/test_backend_ldap.py | 1 + tests/test_contrib_s3_core.py | 2 +- tests/test_keystoneclient.py | 2 +- tests/test_policy.py | 2 +- tests/test_v3_auth.py | 2 +- tests/test_wsgi.py | 2 +- tox.ini | 3 +-- 26 files changed, 34 insertions(+), 34 deletions(-) diff --git a/bin/keystone-all b/bin/keystone-all index 93ce34e440..75bb103ae7 100755 --- a/bin/keystone-all +++ b/bin/keystone-all @@ -21,9 +21,9 @@ if os.path.exists(os.path.join(possible_topdir, from paste import deploy import pbr.version -from keystone import config -from keystone.common import wsgi_server from keystone.common import utils +from keystone.common import wsgi_server +from keystone import config from keystone.openstack.common import importutils diff --git a/httpd/keystone.py b/httpd/keystone.py index 7935f56ff2..9477044b35 100755 --- a/httpd/keystone.py +++ b/httpd/keystone.py @@ -2,8 +2,8 @@ import os from paste import deploy -from keystone import config from keystone.common import logging +from keystone import config LOG = logging.getLogger(__name__) CONF = config.CONF diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py index f643cf275f..9d4db92998 100644 --- a/keystone/auth/controllers.py +++ b/keystone/auth/controllers.py @@ -17,15 +17,15 @@ import json from keystone.auth import token_factory -from keystone.common import controller from keystone.common import cms +from keystone.common import controller from keystone.common import logging from keystone import config from keystone import exception from keystone import identity +from keystone.openstack.common import importutils from keystone import token from keystone import trust -from keystone.openstack.common import importutils LOG = logging.getLogger(__name__) diff --git a/keystone/auth/core.py b/keystone/auth/core.py index da70c43c02..b7bdb7c6f5 100644 --- a/keystone/auth/core.py +++ b/keystone/auth/core.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from keystone import exception from keystone.common import dependency +from keystone import exception @dependency.requires('identity_api') diff --git a/keystone/auth/plugins/password.py b/keystone/auth/plugins/password.py index 662cca0703..ad263f77b7 100644 --- a/keystone/auth/plugins/password.py +++ b/keystone/auth/plugins/password.py @@ -14,9 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. - -from keystone.common import logging from keystone import auth +from keystone.common import logging from keystone import exception from keystone import identity diff --git a/keystone/auth/plugins/token.py b/keystone/auth/plugins/token.py index c84a6da312..f91fa4f1c6 100644 --- a/keystone/auth/plugins/token.py +++ b/keystone/auth/plugins/token.py @@ -14,9 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. - -from keystone.common import logging from keystone import auth +from keystone.common import logging from keystone import exception from keystone import token diff --git a/keystone/auth/token_factory.py b/keystone/auth/token_factory.py index 37c9f1edc9..e6bf61b45f 100644 --- a/keystone/auth/token_factory.py +++ b/keystone/auth/token_factory.py @@ -21,17 +21,17 @@ import subprocess import uuid import webob +from keystone import catalog from keystone.common import cms from keystone.common import logging from keystone.common import utils -from keystone import catalog from keystone import config from keystone import exception from keystone import identity -from keystone import token as token_module -from keystone import trust from keystone.openstack.common import jsonutils from keystone.openstack.common import timeutils +from keystone import token as token_module +from keystone import trust CONF = config.CONF diff --git a/keystone/common/sql/core.py b/keystone/common/sql/core.py index 18ae99d724..4cb720d503 100644 --- a/keystone/common/sql/core.py +++ b/keystone/common/sql/core.py @@ -22,9 +22,9 @@ import sqlalchemy.engine.url from sqlalchemy.exc import DisconnectionError from sqlalchemy.ext import declarative import sqlalchemy.orm +from sqlalchemy.orm.attributes import InstrumentedAttribute import sqlalchemy.pool from sqlalchemy import types as sql_types -from sqlalchemy.orm.attributes import InstrumentedAttribute from keystone.common import logging from keystone import config diff --git a/keystone/common/sql/legacy.py b/keystone/common/sql/legacy.py index 82dda2cf26..f2e0b994e3 100644 --- a/keystone/common/sql/legacy.py +++ b/keystone/common/sql/legacy.py @@ -20,9 +20,9 @@ import sqlalchemy from sqlalchemy import exc from keystone.common import logging +from keystone import config from keystone.contrib.ec2.backends import sql as ec2_sql from keystone.identity.backends import sql as identity_sql -from keystone import config LOG = logging.getLogger(__name__) diff --git a/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py b/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py index 3a88f897fb..387d75edb3 100644 --- a/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py +++ b/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py @@ -18,6 +18,7 @@ import json import sqlalchemy as sql from sqlalchemy import orm + from keystone import config diff --git a/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py b/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py index 71a3ef59e9..cfab79d469 100644 --- a/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py +++ b/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py @@ -39,6 +39,7 @@ of integrity constraints. import sqlalchemy as sql from sqlalchemy.orm import sessionmaker + from keystone import config diff --git a/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py b/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py index b6fbe54db3..ee1d34ebc9 100644 --- a/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py +++ b/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py @@ -14,10 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. - +from migrate import ForeignKeyConstraint import sqlalchemy from sqlalchemy.orm import sessionmaker -from migrate import ForeignKeyConstraint MYSQL_FKEY_QUERY = ("select CONSTRAINT_NAME from " "INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS " diff --git a/keystone/common/sql/nova.py b/keystone/common/sql/nova.py index 7e4d9b37c8..c6d452cd10 100644 --- a/keystone/common/sql/nova.py +++ b/keystone/common/sql/nova.py @@ -18,8 +18,8 @@ import uuid -from keystone import config from keystone.common import logging +from keystone import config from keystone.contrib.ec2.backends import sql as ec2_sql from keystone.identity.backends import sql as identity_sql diff --git a/keystone/controllers.py b/keystone/controllers.py index 150971baa5..6dd303e1f2 100644 --- a/keystone/controllers.py +++ b/keystone/controllers.py @@ -14,11 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. -from keystone.common import wsgi from keystone.common import logging +from keystone.common import wsgi from keystone import config from keystone import exception + LOG = logging.getLogger(__name__) CONF = config.CONF diff --git a/keystone/policy/backends/rules.py b/keystone/policy/backends/rules.py index 8d1bb0f8c2..63110e69ec 100644 --- a/keystone/policy/backends/rules.py +++ b/keystone/policy/backends/rules.py @@ -20,10 +20,10 @@ import os.path from keystone.common import logging -from keystone.openstack.common import policy as common_policy from keystone.common import utils from keystone import config from keystone import exception +from keystone.openstack.common import policy as common_policy from keystone import policy diff --git a/keystone/service.py b/keystone/service.py index f41eb8c9c1..406004d6f9 100644 --- a/keystone/service.py +++ b/keystone/service.py @@ -18,11 +18,11 @@ import routes from keystone import auth from keystone import catalog -from keystone import config -from keystone import controllers from keystone.common import logging from keystone.common import wsgi +from keystone import config from keystone.contrib import ec2 +from keystone import controllers from keystone import credential from keystone import identity from keystone import policy diff --git a/keystone/trust/backends/kvs.py b/keystone/trust/backends/kvs.py index 40b7c9e495..96995e37db 100644 --- a/keystone/trust/backends/kvs.py +++ b/keystone/trust/backends/kvs.py @@ -19,10 +19,9 @@ only to be used for testing purposes """ import copy - from keystone.common import kvs -from keystone.openstack.common import timeutils from keystone import exception +from keystone.openstack.common import timeutils from keystone import trust diff --git a/keystone/trust/controllers.py b/keystone/trust/controllers.py index 1d7dce6cdd..f918ed472b 100644 --- a/keystone/trust/controllers.py +++ b/keystone/trust/controllers.py @@ -1,11 +1,11 @@ import uuid -from keystone import config -from keystone import exception -from keystone import identity from keystone.common import controller from keystone.common import dependency from keystone.common import logging +from keystone import config +from keystone import exception +from keystone import identity from keystone.openstack.common import timeutils diff --git a/tests/test_backend_kvs.py b/tests/test_backend_kvs.py index f3a8ece0b9..3a4e2da876 100644 --- a/tests/test_backend_kvs.py +++ b/tests/test_backend_kvs.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. import uuid + import nose.exc from keystone import catalog diff --git a/tests/test_backend_ldap.py b/tests/test_backend_ldap.py index 0f53b06c3f..416bce3dde 100644 --- a/tests/test_backend_ldap.py +++ b/tests/test_backend_ldap.py @@ -16,6 +16,7 @@ # under the License. import uuid + import nose.exc from keystone.common.ldap import fakeldap diff --git a/tests/test_contrib_s3_core.py b/tests/test_contrib_s3_core.py index 40d8d54c13..c76bc898e2 100644 --- a/tests/test_contrib_s3_core.py +++ b/tests/test_contrib_s3_core.py @@ -16,8 +16,8 @@ import uuid -from keystone.contrib import s3 from keystone.contrib import ec2 +from keystone.contrib import s3 from keystone import exception from keystone import test diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py index 0d6ae9a49b..1357cb9c0c 100644 --- a/tests/test_keystoneclient.py +++ b/tests/test_keystoneclient.py @@ -19,9 +19,9 @@ import webob import nose.exc +from keystone import config from keystone.openstack.common import jsonutils from keystone.openstack.common import timeutils -from keystone import config from keystone import test import default_fixtures diff --git a/tests/test_policy.py b/tests/test_policy.py index a43c9d3e5a..465fd69a5b 100644 --- a/tests/test_policy.py +++ b/tests/test_policy.py @@ -21,9 +21,9 @@ import urllib2 from keystone import config from keystone import exception -from keystone import test from keystone.openstack.common import policy as common_policy from keystone.policy.backends import rules +from keystone import test CONF = config.CONF diff --git a/tests/test_v3_auth.py b/tests/test_v3_auth.py index 170bfdee2f..cb9364cf46 100644 --- a/tests/test_v3_auth.py +++ b/tests/test_v3_auth.py @@ -17,8 +17,8 @@ import uuid import nose.exc -from keystone.common import cms from keystone import auth +from keystone.common import cms from keystone import config from keystone import exception diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py index 87d9929dc7..2d81ba86b6 100644 --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -17,9 +17,9 @@ import webob from keystone.common import wsgi +from keystone import exception from keystone.openstack.common import jsonutils from keystone import test -from keystone import exception class FakeApp(wsgi.Application): diff --git a/tox.ini b/tox.ini index ed4d0ac48f..cd97a08e4f 100644 --- a/tox.ini +++ b/tox.ini @@ -32,12 +32,11 @@ commands = {posargs} show-source = true # H304: no relative imports. -# H306: imports not in alphabetical order # H401: docstring should not start with a space # H402: one line docstring needs punctuation # H403: multi line docstring end on new line # H404: multi line docstring should start with a summary -ignore = H304,H306,H401,H402,H403,H404 +ignore = H304,H401,H402,H403,H404 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor