Order imports in alphabetical order (4/9)
This patch is one in a series to re-enable H306 style check rule (imports are in alphabetical order). It touches db files. Implements: blueprint reduce-flake8-ignored-rules (partial) Change-Id: I66842c6a5d112f948e625e18ef6d01afcad61e57
This commit is contained in:
parent
6e2412a468
commit
5be43b045a
@ -13,18 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
'''Implementation of SQLAlchemy backend.'''
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
import sqlalchemy
|
||||
from sqlalchemy.orm.session import Session
|
||||
|
||||
cfg.CONF.import_opt('max_events_per_stack', 'heat.common.config')
|
||||
|
||||
from heat.openstack.common.gettextutils import _
|
||||
|
||||
from heat.common import crypt
|
||||
from heat.common import exception
|
||||
from heat.db.sqlalchemy import filters as db_filters
|
||||
@ -32,7 +28,9 @@ from heat.db.sqlalchemy import migration
|
||||
from heat.db.sqlalchemy import models
|
||||
from heat.openstack.common.db.sqlalchemy import session as db_session
|
||||
from heat.openstack.common.db.sqlalchemy import utils
|
||||
from heat.openstack.common.gettextutils import _
|
||||
|
||||
cfg.CONF.import_opt('max_events_per_stack', 'heat.common.config')
|
||||
|
||||
get_engine = db_session.get_engine
|
||||
get_session = db_session.get_session
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from migrate.versioning import util as migrate_util
|
||||
import sqlalchemy
|
||||
|
||||
from migrate.versioning import util as migrate_util
|
||||
from heat.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
|
@ -10,9 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import sqlalchemy
|
||||
import uuid
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
|
||||
def upgrade(migrate_engine):
|
||||
meta = sqlalchemy.MetaData(bind=migrate_engine)
|
||||
|
@ -12,6 +12,7 @@
|
||||
# under the License.
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
from heat.db.sqlalchemy.types import Json
|
||||
|
||||
|
||||
|
@ -11,11 +11,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import uuid
|
||||
import itertools
|
||||
import sqlalchemy
|
||||
import uuid
|
||||
|
||||
import migrate.changeset.constraint as constraint
|
||||
import sqlalchemy
|
||||
|
||||
from heat.openstack.common import timeutils
|
||||
|
||||
|
||||
|
@ -11,12 +11,13 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
from migrate.versioning import util as migrate_util
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from heat.openstack.common.gettextutils import _
|
||||
from heat.db.sqlalchemy import models
|
||||
from heat.engine.hot.parameters import HOTParamSchema
|
||||
from heat.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
def upgrade(migrate_engine):
|
||||
|
@ -11,11 +11,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from heat.db.sqlalchemy.types import LongText
|
||||
from heat.db.sqlalchemy.types import Json
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
from heat.db.sqlalchemy.types import Json
|
||||
from heat.db.sqlalchemy.types import LongText
|
||||
|
||||
|
||||
def upgrade(migrate_engine):
|
||||
meta = sqlalchemy.MetaData(bind=migrate_engine)
|
||||
|
@ -11,11 +11,12 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
from migrate.versioning import util as migrate_util
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from heat.openstack.common.gettextutils import _
|
||||
from heat.db.sqlalchemy import models
|
||||
from heat.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
def upgrade(migrate_engine):
|
||||
|
@ -17,14 +17,15 @@ SQLAlchemy models for heat data.
|
||||
import uuid
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
from sqlalchemy.orm import relationship, backref
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from heat.openstack.common import timeutils
|
||||
from sqlalchemy.orm import backref
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm.session import Session
|
||||
|
||||
from heat.db.sqlalchemy.types import Json
|
||||
from heat.openstack.common.db.sqlalchemy import models
|
||||
from heat.openstack.common.db.sqlalchemy import session
|
||||
from sqlalchemy.orm.session import Session
|
||||
from heat.db.sqlalchemy.types import Json
|
||||
from heat.openstack.common import timeutils
|
||||
|
||||
BASE = declarative_base()
|
||||
get_session = session.get_session
|
||||
|
@ -13,8 +13,9 @@
|
||||
|
||||
from json import dumps
|
||||
from json import loads
|
||||
from sqlalchemy import types
|
||||
|
||||
from sqlalchemy.dialects import mysql
|
||||
from sqlalchemy import types
|
||||
|
||||
|
||||
class LongText(types.TypeDecorator):
|
||||
|
@ -17,14 +17,14 @@ from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from heat.db import migration
|
||||
from heat.openstack.common import gettextutils
|
||||
from heat.openstack.common import log as logging
|
||||
|
||||
gettextutils.install('heat')
|
||||
|
||||
from oslo.config import cfg
|
||||
from heat.openstack.common import log as logging
|
||||
from heat.db import migration
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user