Satisfy flake8 import rules F401 and F403

- Removed unused imports
- Ignore wildcard and unused imports from core modules (and avoid
  wildcard imports otherwise) to __init__ modules

Change-Id: Ie2e5f61ae37481f5d248788cfd83dc92ffddbd91
This commit is contained in:
Dolph Mathews 2013-05-16 14:06:59 -05:00
parent d6fb11c1b7
commit b05ebb8780
28 changed files with 29 additions and 32 deletions

View File

@ -21,7 +21,6 @@ if os.path.exists(os.path.join(possible_topdir,
from paste import deploy
from keystone import config
from keystone.common import wsgi
from keystone.common import wsgi_server
from keystone.common import utils
from keystone.openstack.common import importutils

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2013 OpenStack LLC
#
@ -14,6 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone.auth.core import AuthMethodHandler
from keystone.auth import controllers
from keystone.auth.core import *
from keystone.auth import routers

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -21,7 +21,7 @@ def _ensure_subprocess():
else:
import subprocess
except ImportError:
import subprocess
import subprocess # nopep8
def cms_verify(formatted, signing_cert_file_name, ca_file_name):

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -14,25 +14,25 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import *
import sqlalchemy as sql
def upgrade(migrate_engine):
# Upgrade operations go here. Don't create your own engine; bind
meta = MetaData()
meta = sql.MetaData()
meta.bind = migrate_engine
token = Table('token', meta, autoload=True)
token = sql.Table('token', meta, autoload=True)
# creating the column immediately with nullable=False fails with
# PostgreSQL (LP 1068181), so do it in two steps instead
valid = Column("valid", Boolean(), ColumnDefault(True), nullable=True)
valid = sql.Column(
'valid', sql.Boolean(), sql.ColumnDefault(True), nullable=True)
valid.create(token, populate_default=True)
valid.alter(type=Boolean(), default=True, nullable=False)
valid.alter(type=sql.Boolean(), default=True, nullable=False)
def downgrade(migrate_engine):
meta = MetaData()
meta = sql.MetaData()
meta.bind = migrate_engine
token = Table('token', meta, autoload=True)
token = sql.Table('token', meta, autoload=True)
token.drop_column('valid')

View File

@ -17,7 +17,6 @@
from sqlalchemy import Column, MetaData, String, Table, Text, types
from sqlalchemy.orm import sessionmaker
from keystone import config
#sqlite doesn't support dropping columns. Copy to a new table instead

View File

@ -1,11 +1,8 @@
import json
import uuid
import sqlalchemy as sql
from sqlalchemy import orm
from keystone import config
from keystone import exception
CONF = config.CONF

View File

@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import migrate
import sqlalchemy as sql

View File

@ -1,11 +1,6 @@
import json
import uuid
import sqlalchemy as sql
from sqlalchemy import orm
from keystone import config
from keystone import exception
CONF = config.CONF

View File

@ -1,11 +1,8 @@
import json
import uuid
import sqlalchemy as sql
from sqlalchemy import orm
from keystone import config
from keystone import exception
CONF = config.CONF

View File

@ -14,12 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import sqlalchemy
from sqlalchemy import exc
from sqlalchemy.orm import sessionmaker
from keystone import config
def downgrade_token_table_with_column_drop(meta, migrate_engine):

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2013 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 Red Hat, Inc
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2013 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#

View File

@ -1,4 +1,5 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# flake8: noqa
# Copyright 2012 OpenStack LLC
#
@ -14,6 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone.trust.core import Manager, Driver
from keystone.trust import controllers
from keystone.trust.core import *
from keystone.trust import routers

View File

@ -16,8 +16,6 @@
import uuid
from keystone import exception
import test_v3

View File

@ -30,6 +30,6 @@ commands = {posargs}
[flake8]
show-source = true
ignore = H,F841,F401,F403
ignore = H,F841
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor