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:
parent
d6fb11c1b7
commit
b05ebb8780
@ -21,7 +21,6 @@ if os.path.exists(os.path.join(possible_topdir,
|
|||||||
from paste import deploy
|
from paste import deploy
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone.common import wsgi
|
|
||||||
from keystone.common import wsgi_server
|
from keystone.common import wsgi_server
|
||||||
from keystone.common import utils
|
from keystone.common import utils
|
||||||
from keystone.openstack.common import importutils
|
from keystone.openstack.common import importutils
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2013 OpenStack LLC
|
# Copyright 2013 OpenStack LLC
|
||||||
#
|
#
|
||||||
@ -14,6 +15,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from keystone.auth.core import AuthMethodHandler
|
|
||||||
from keystone.auth import controllers
|
from keystone.auth import controllers
|
||||||
|
from keystone.auth.core import *
|
||||||
from keystone.auth import routers
|
from keystone.auth import routers
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -21,7 +21,7 @@ def _ensure_subprocess():
|
|||||||
else:
|
else:
|
||||||
import subprocess
|
import subprocess
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import subprocess
|
import subprocess # nopep8
|
||||||
|
|
||||||
|
|
||||||
def cms_verify(formatted, signing_cert_file_name, ca_file_name):
|
def cms_verify(formatted, signing_cert_file_name, ca_file_name):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -14,25 +14,25 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import sqlalchemy as sql
|
||||||
from sqlalchemy import *
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade(migrate_engine):
|
def upgrade(migrate_engine):
|
||||||
# Upgrade operations go here. Don't create your own engine; bind
|
# Upgrade operations go here. Don't create your own engine; bind
|
||||||
|
|
||||||
meta = MetaData()
|
meta = sql.MetaData()
|
||||||
meta.bind = migrate_engine
|
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
|
# creating the column immediately with nullable=False fails with
|
||||||
# PostgreSQL (LP 1068181), so do it in two steps instead
|
# 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.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):
|
def downgrade(migrate_engine):
|
||||||
meta = MetaData()
|
meta = sql.MetaData()
|
||||||
meta.bind = migrate_engine
|
meta.bind = migrate_engine
|
||||||
token = Table('token', meta, autoload=True)
|
token = sql.Table('token', meta, autoload=True)
|
||||||
token.drop_column('valid')
|
token.drop_column('valid')
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
from sqlalchemy import Column, MetaData, String, Table, Text, types
|
from sqlalchemy import Column, MetaData, String, Table, Text, types
|
||||||
from sqlalchemy.orm import sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
from keystone import config
|
|
||||||
|
|
||||||
|
|
||||||
#sqlite doesn't support dropping columns. Copy to a new table instead
|
#sqlite doesn't support dropping columns. Copy to a new table instead
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
import uuid
|
|
||||||
|
|
||||||
import sqlalchemy as sql
|
import sqlalchemy as sql
|
||||||
from sqlalchemy import orm
|
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import exception
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import migrate
|
|
||||||
import sqlalchemy as sql
|
import sqlalchemy as sql
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import json
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
import sqlalchemy as sql
|
import sqlalchemy as sql
|
||||||
from sqlalchemy import orm
|
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import exception
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
import uuid
|
|
||||||
|
|
||||||
import sqlalchemy as sql
|
import sqlalchemy as sql
|
||||||
from sqlalchemy import orm
|
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import exception
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
@ -14,12 +14,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from sqlalchemy import exc
|
from sqlalchemy import exc
|
||||||
from sqlalchemy.orm import sessionmaker
|
|
||||||
|
|
||||||
from keystone import config
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade_token_table_with_column_drop(meta, migrate_engine):
|
def downgrade_token_table_with_column_drop(meta, migrate_engine):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2013 OpenStack LLC
|
# Copyright 2013 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 Red Hat, Inc
|
# Copyright 2012 Red Hat, Inc
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2013 OpenStack LLC
|
# Copyright 2013 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
# flake8: noqa
|
||||||
|
|
||||||
# Copyright 2012 OpenStack LLC
|
# Copyright 2012 OpenStack LLC
|
||||||
#
|
#
|
||||||
@ -14,6 +15,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from keystone.trust.core import Manager, Driver
|
|
||||||
from keystone.trust import controllers
|
from keystone.trust import controllers
|
||||||
|
from keystone.trust.core import *
|
||||||
from keystone.trust import routers
|
from keystone.trust import routers
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from keystone import exception
|
|
||||||
|
|
||||||
import test_v3
|
import test_v3
|
||||||
|
|
||||||
|
|
||||||
|
2
tox.ini
2
tox.ini
@ -30,6 +30,6 @@ commands = {posargs}
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source = true
|
show-source = true
|
||||||
ignore = H,F841,F401,F403
|
ignore = H,F841
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor
|
||||||
|
Loading…
Reference in New Issue
Block a user