Enable H305 and H307 style checks

Correct grouping and ordering of imports

Change-Id: I47ea0d53f80d7f0aeb01c1c6afd63713be87ddf4
This commit is contained in:
Pavlo Shchelokovskyy 2014-12-14 22:17:21 +02:00
parent cfc83ee125
commit 4279bd2923
98 changed files with 135 additions and 118 deletions

View File

@ -20,7 +20,6 @@ import eventlet
eventlet.monkey_patch(os=False) eventlet.monkey_patch(os=False)
import os import os
import six
import sys import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that # If ../heat/__init__.py exists, add ../ to Python search path, so that
@ -33,6 +32,7 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
from oslo.config import cfg from oslo.config import cfg
from oslo import i18n from oslo import i18n
import six
from heat.common import config from heat.common import config
from heat.common.i18n import _LI from heat.common.i18n import _LI

View File

@ -22,7 +22,6 @@ import eventlet
eventlet.monkey_patch(os=False) eventlet.monkey_patch(os=False)
import os import os
import six
import sys import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that # If ../heat/__init__.py exists, add ../ to Python search path, so that
@ -35,6 +34,7 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
from oslo.config import cfg from oslo.config import cfg
from oslo import i18n from oslo import i18n
import six
from heat.common import config from heat.common import config
from heat.common.i18n import _LI from heat.common.i18n import _LI

View File

@ -22,7 +22,6 @@ import eventlet
eventlet.monkey_patch(os=False) eventlet.monkey_patch(os=False)
import os import os
import six
import sys import sys
# If ../heat/__init__.py exists, add ../ to Python search path, so that # If ../heat/__init__.py exists, add ../ to Python search path, so that
@ -35,6 +34,7 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
from oslo.config import cfg from oslo.config import cfg
from oslo import i18n from oslo import i18n
import six
from heat.common import config from heat.common import config
from heat.common.i18n import _LI from heat.common.i18n import _LI

View File

@ -41,7 +41,6 @@ from heat.common import profiler
from heat.engine import template from heat.engine import template
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
from heat.openstack.common import service from heat.openstack.common import service
from heat.rpc import api as rpc_api from heat.rpc import api as rpc_api
i18n.enable_lazy() i18n.enable_lazy()
@ -62,7 +61,7 @@ if __name__ == '__main__':
if not mgr or not mgr.names(): if not mgr or not mgr.names():
sys.exit("ERROR: No template format plugins registered") sys.exit("ERROR: No template format plugins registered")
from heat.engine import service as engine from heat.engine import service as engine # noqa
profiler.setup('heat-engine', cfg.CONF.host) profiler.setup('heat-engine', cfg.CONF.host)
srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC) srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC)

View File

@ -18,9 +18,9 @@ from heat.engine import resource
from heat.engine import template from heat.engine import template
from heat.tests import common from heat.tests import common
from heat.tests import utils from heat.tests import utils
from heat.tests.v1_1 import fakes
from ..resources import nova_flavor # noqa from ..resources import nova_flavor # noqa
from heat.tests.v1_1 import fakes
flavor_template = { flavor_template = {
'heat_template_version': '2013-05-23', 'heat_template_version': '2013-05-23',

View File

@ -18,7 +18,10 @@ import random
import time import time
import urlparse import urlparse
from glanceclient import client as gc
from oslo.config import cfg from oslo.config import cfg
from swiftclient import utils as swiftclient_utils
from troveclient import client as tc
from heat.common import exception from heat.common import exception
from heat.common.i18n import _LI from heat.common.i18n import _LI
@ -29,12 +32,8 @@ from heat.engine.clients.os import glance
from heat.engine.clients.os import nova from heat.engine.clients.os import nova
from heat.engine.clients.os import swift from heat.engine.clients.os import swift
from heat.engine.clients.os import trove from heat.engine.clients.os import trove
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
from glanceclient import client as gc
from swiftclient import utils as swiftclient_utils
from troveclient import client as tc
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -14,9 +14,10 @@
import copy import copy
import json import json
import uuid
import mock import mock
import six import six
import uuid
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -11,10 +11,10 @@
# 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 six
import uuid import uuid
import mock import mock
import six
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -17,10 +17,11 @@ from distutils import version
import errno import errno
import logging import logging
import os import os
import pkg_resources
import subprocess import subprocess
import sys import sys
import pkg_resources
VAR_PATH = '/var/lib/heat-cfntools' VAR_PATH = '/var/lib/heat-cfntools'
LOG = logging.getLogger('heat-provision') LOG = logging.getLogger('heat-provision')

View File

@ -16,7 +16,6 @@
import collections import collections
import copy import copy
import json import json
from oslo.utils import importutils
import uuid import uuid
from keystoneclient.auth.identity import v3 as kc_auth_v3 from keystoneclient.auth.identity import v3 as kc_auth_v3
@ -24,6 +23,7 @@ import keystoneclient.exceptions as kc_exception
from keystoneclient import session from keystoneclient import session
from keystoneclient.v3 import client as kc_v3 from keystoneclient.v3 import client as kc_v3
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import importutils
from heat.common import context from heat.common import context
from heat.common import exception from heat.common import exception

View File

@ -20,10 +20,11 @@ for them before loading them.
""" """
import pkgutil import pkgutil
import six
import sys import sys
import types import types
import six
from heat.common.i18n import _LE from heat.common.i18n import _LE
from heat.openstack.common import log as logging from heat.openstack.common import log as logging

View File

@ -14,9 +14,9 @@
import itertools import itertools
import json import json
import re import re
import six
from oslo.config import cfg from oslo.config import cfg
import six
import yaml import yaml
from heat.common import exception from heat.common import exception

View File

@ -16,7 +16,6 @@
from oslo.config import cfg from oslo.config import cfg
import requests import requests
from requests import exceptions from requests import exceptions
from six.moves import urllib from six.moves import urllib
from heat.common import exception from heat.common import exception

View File

@ -13,13 +13,13 @@
'''Implementation of SQLAlchemy backend.''' '''Implementation of SQLAlchemy backend.'''
import datetime import datetime
import six
import sys import sys
from oslo.config import cfg from oslo.config import cfg
from oslo.db.sqlalchemy import session as db_session from oslo.db.sqlalchemy import session as db_session
from oslo.db.sqlalchemy import utils from oslo.db.sqlalchemy import utils
import osprofiler.sqlalchemy import osprofiler.sqlalchemy
import six
import sqlalchemy import sqlalchemy
from sqlalchemy import orm from sqlalchemy import orm
from sqlalchemy.orm import session as orm_session from sqlalchemy.orm import session as orm_session

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
import collections import collections
import six
import warnings import warnings
import six
from heat.common.i18n import _ from heat.common.i18n import _
from heat.engine import constraints as constr from heat.engine import constraints as constr
from heat.engine import support from heat.engine import support

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import collections import collections
import six import six
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -11,12 +11,12 @@
# 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 six import warnings
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import importutils from oslo.utils import importutils
import six
from stevedore import extension from stevedore import extension
import warnings
from heat.common import exception from heat.common import exception
from heat.common.i18n import _LE from heat.common.i18n import _LE

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import abc import abc
from oslo.config import cfg from oslo.config import cfg
import six import six

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import collections import collections
import six import six
from heat.common import exception from heat.common import exception

View File

@ -11,6 +11,7 @@
# under the License. # under the License.
import collections import collections
import six import six
from heat.common import exception from heat.common import exception

View File

@ -14,11 +14,12 @@
import base64 import base64
import contextlib import contextlib
import datetime as dt import datetime as dt
import warnings
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import encodeutils from oslo.utils import encodeutils
from oslo.utils import excutils from oslo.utils import excutils
import six import six
import warnings
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import math import math
from oslo.utils import excutils from oslo.utils import excutils
import six import six

View File

@ -15,7 +15,6 @@ import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _
from heat.common.i18n import _LI from heat.common.i18n import _LI
from heat.engine import attributes from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties

View File

@ -10,9 +10,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 six
from oslo.utils import excutils from oslo.utils import excutils
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -11,9 +11,9 @@
# 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 os import os
import six
from oslo.config import cfg from oslo.config import cfg
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -10,9 +10,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 six
from oslo.utils import excutils from oslo.utils import excutils
import six
from heat.common.i18n import _ from heat.common.i18n import _
from heat.common.i18n import _LE from heat.common.i18n import _LE

View File

@ -16,15 +16,15 @@ import email
from email.mime import multipart from email.mime import multipart
from email.mime import text from email.mime import text
import json import json
from novaclient import exceptions as nova_exceptions
import os import os
import pkgutil import pkgutil
import string import string
import warnings
from novaclient import exceptions as nova_exceptions
from oslo.config import cfg from oslo.config import cfg
import six import six
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
import warnings
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -20,9 +20,8 @@ from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
from heat.engine import signal_responder from heat.engine import signal_responder
from heat.scaling import cooldown
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
from heat.scaling import cooldown
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import json import json
import six import six
from heat.common.i18n import _ from heat.common.i18n import _
@ -23,7 +24,6 @@ from heat.engine import resource
from heat.engine.resources import wait_condition as wc_base from heat.engine.resources import wait_condition as wc_base
from heat.engine import scheduler from heat.engine import scheduler
from heat.engine import support from heat.engine import support
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -23,7 +23,6 @@ from heat.engine import environment
from heat.engine import function from heat.engine import function
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -13,6 +13,7 @@
import collections import collections
import copy import copy
import six import six
from heat.common import exception from heat.common import exception

View File

@ -11,7 +11,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 six import six
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from heat.common import exception from heat.common import exception

View File

@ -12,12 +12,12 @@
# under the License. # under the License.
import copy import copy
import six
import uuid import uuid
from oslo.config import cfg from oslo.config import cfg
from oslo.serialization import jsonutils from oslo.serialization import jsonutils
from oslo.utils import uuidutils from oslo.utils import uuidutils
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
import copy import copy
import six
import uuid import uuid
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _
from heat.engine import attributes from heat.engine import attributes

View File

@ -13,6 +13,7 @@
import collections import collections
import functools import functools
import six import six
from heat.common import exception from heat.common import exception

View File

@ -11,7 +11,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 six import six
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from heat.common import exception from heat.common import exception

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
import json import json
import six
import urlparse import urlparse
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _
from heat.common.i18n import _LI from heat.common.i18n import _LI

View File

@ -14,10 +14,10 @@ import collections
import copy import copy
import itertools import itertools
import operator import operator
import six import six
from heat.common import exception from heat.common import exception
from heat.engine import function from heat.engine import function
from heat.engine import properties from heat.engine import properties

View File

@ -15,6 +15,7 @@ import collections
import functools import functools
import json import json
import os import os
import warnings
import eventlet import eventlet
from oslo.config import cfg from oslo.config import cfg
@ -24,7 +25,6 @@ from oslo.utils import uuidutils
from osprofiler import profiler from osprofiler import profiler
import requests import requests
import six import six
import warnings
import webob import webob
from heat.common import context from heat.common import context

View File

@ -12,10 +12,10 @@
# under the License. # under the License.
import hashlib import hashlib
import six
from oslo.config import cfg from oslo.config import cfg
from oslo.serialization import jsonutils from oslo.serialization import jsonutils
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -15,6 +15,7 @@ import abc
import collections import collections
import copy import copy
import functools import functools
import six import six
from stevedore import extension from stevedore import extension

View File

@ -12,7 +12,6 @@
# under the License. # under the License.
from heat.common import short_id from heat.common import short_id
from heat.engine import template from heat.engine import template

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import datetime import datetime
import mock import mock
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import timeutils from oslo.utils import timeutils

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import datetime import datetime
import mock import mock
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import timeutils from oslo.utils import timeutils

View File

@ -12,9 +12,9 @@
# under the License. # under the License.
import copy import copy
import mock
from cinderclient import exceptions as cinder_exp from cinderclient import exceptions as cinder_exp
import mock
import mox import mox
from oslo.config import cfg from oslo.config import cfg
import six import six

View File

@ -14,12 +14,12 @@
import copy import copy
import datetime import datetime
import json import json
import six
import time import time
import uuid import uuid
import mox import mox
from oslo.config import cfg from oslo.config import cfg
import six
from heat.common import identifier from heat.common import identifier
from heat.common import template_format from heat.common import template_format

View File

@ -11,10 +11,11 @@
# 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 six
import time import time
import uuid import uuid
import six
from heat.common import identifier from heat.common import identifier
from heat.common import template_format from heat.common import template_format
from heat.db import api as db_api from heat.db import api as db_api

View File

@ -13,10 +13,10 @@
import json import json
import os import os
import six
import mock import mock
from oslo.config import cfg from oslo.config import cfg
import six
from heat.api.aws import exception from heat.api.aws import exception
import heat.api.cfn.v1.stacks as stacks import heat.api.cfn.v1.stacks as stacks

View File

@ -13,11 +13,11 @@
import json import json
import six
from oslo.config import cfg from oslo.config import cfg
from oslo.utils import importutils from oslo.utils import importutils
import requests import requests
import six
from heat.api.aws import ec2token from heat.api.aws import ec2token
from heat.api.aws import exception from heat.api.aws import exception

View File

@ -13,10 +13,10 @@
import copy import copy
import json import json
import six
import mox import mox
from oslo.config import cfg from oslo.config import cfg
import six
from testtools import matchers from testtools import matchers
from heat.common import exception from heat.common import exception

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
"""Tests for :module:'heat.engine.clients.os.cinder'.""" """Tests for :module:'heat.engine.clients.os.cinder'."""
import mock
import uuid import uuid
import mock
from heat.common import exception from heat.common import exception
from heat.engine.clients.os import cinder from heat.engine.clients.os import cinder
from heat.tests import common from heat.tests import common

View File

@ -11,23 +11,21 @@
# 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 six
from ceilometerclient import exc as ceil_exc from ceilometerclient import exc as ceil_exc
from ceilometerclient.openstack.common.apiclient import exceptions as c_a_exc from ceilometerclient.openstack.common.apiclient import exceptions as c_a_exc
from cinderclient import exceptions as cinder_exc from cinderclient import exceptions as cinder_exc
from glanceclient import exc as glance_exc from glanceclient import exc as glance_exc
from heatclient import client as heatclient
from heatclient import exc as heat_exc from heatclient import exc as heat_exc
from keystoneclient import exceptions as keystone_exc from keystoneclient import exceptions as keystone_exc
from neutronclient.common import exceptions as neutron_exc
from saharaclient.api import base as sahara_base
from swiftclient import exceptions as swift_exc
from troveclient import client as troveclient
from heatclient import client as heatclient
import mock import mock
from neutronclient.common import exceptions as neutron_exc
from oslo.config import cfg from oslo.config import cfg
from saharaclient.api import base as sahara_base
import six
from swiftclient import exceptions as swift_exc
from testtools import testcase from testtools import testcase
from troveclient import client as troveclient
from heat.common import exception from heat.common import exception
from heat.engine import clients from heat.engine import clients

View File

@ -11,9 +11,10 @@
# 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 mock
import uuid import uuid
import mock
from heat.engine import parser from heat.engine import parser
from heat.engine.resources.software_config import cloud_config as cc from heat.engine.resources.software_config import cloud_config as cc
from heat.engine import template from heat.engine import template

View File

@ -11,8 +11,9 @@
# 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 mock
import os import os
import mock
from oslo.config import cfg from oslo.config import cfg
from oslo_middleware import request_id from oslo_middleware import request_id
import webob import webob

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import mox import mox
from neutronclient.v2_0 import client as neutronclient from neutronclient.v2_0 import client as neutronclient
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions

View File

@ -12,9 +12,9 @@
# under the License. # under the License.
import datetime as dt import datetime as dt
import json
import uuid import uuid
import json
import mock import mock
import six import six

View File

@ -11,13 +11,12 @@
# 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 eventlet
import functools import functools
import json import json
import sys import sys
import uuid import uuid
import eventlet
from eventlet import event as grevent from eventlet import event as grevent
import mock import mock
import mox import mox

View File

@ -12,13 +12,13 @@
# under the License. # under the License.
import inspect import inspect
from oslo.config import cfg
import re import re
from oslo.config import cfg
from oslo.messaging._drivers import common as rpc_common
import six import six
import webob import webob
from oslo.messaging._drivers import common as rpc_common
import heat.api.middleware.fault as fault import heat.api.middleware.fault as fault
from heat.common import exception as heat_exc from heat.common import exception as heat_exc
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
import copy import copy
import six
import uuid import uuid
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _
from heat.engine.cfn import functions from heat.engine.cfn import functions

View File

@ -11,11 +11,11 @@
# 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 mock
import six
import uuid import uuid
from glanceclient import exc as glance_exceptions from glanceclient import exc as glance_exceptions
import mock
import six
from heat.common import exception from heat.common import exception
from heat.engine.clients.os import glance from heat.engine.clients.os import glance

View File

@ -12,8 +12,6 @@
# under the License. # under the License.
import json import json
import mox
import six
import uuid import uuid
from keystoneclient.auth.identity import v3 as ks_auth_v3 from keystoneclient.auth.identity import v3 as ks_auth_v3
@ -21,7 +19,9 @@ import keystoneclient.exceptions as kc_exception
from keystoneclient import session as ks_session from keystoneclient import session as ks_session
from keystoneclient.v3 import client as kc_v3 from keystoneclient.v3 import client as kc_v3
from keystoneclient.v3 import domains as kc_v3_domains from keystoneclient.v3 import domains as kc_v3_domains
import mox
from oslo.config import cfg from oslo.config import cfg
import six
from heat.common import exception from heat.common import exception
from heat.common import heat_keystoneclient from heat.common import heat_keystoneclient

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import six import six
from heat.common import exception from heat.common import exception

View File

@ -12,13 +12,13 @@
# under the License. # under the License.
import copy import copy
import six
import uuid import uuid
from glanceclient import exc as glance_exceptions from glanceclient import exc as glance_exceptions
import mock import mock
import mox import mox
from neutronclient.v2_0 import client as neutronclient from neutronclient.v2_0 import client as neutronclient
import six
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -12,9 +12,9 @@
# under the License. # under the License.
import copy import copy
import six
import mock import mock
import six
from heat.common import exception from heat.common import exception
from heat.common import grouputils from heat.common import grouputils

View File

@ -12,11 +12,12 @@
# under the License. # under the License.
import errno import errno
import mox
import os import os
import pkg_resources
import subprocess import subprocess
import mox
import pkg_resources
from heat.cloudinit import loguserdata from heat.cloudinit import loguserdata
from heat.tests import common from heat.tests import common

View File

@ -12,9 +12,9 @@
# under the License. # under the License.
import email import email
import uuid
import mock import mock
import uuid
from heat.common import exception as exc from heat.common import exception as exc
from heat.engine import parser from heat.engine import parser

View File

@ -14,12 +14,12 @@
import copy import copy
import json import json
import six
import yaml
import mock import mock
from oslo.config import cfg from oslo.config import cfg
from requests import exceptions from requests import exceptions
import six
import yaml
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -12,13 +12,13 @@
# under the License. # under the License.
import copy import copy
import six
import mock import mock
import mox import mox
from neutronclient.common import exceptions as qe from neutronclient.common import exceptions as qe
from neutronclient.neutron import v2_0 as neutronV20 from neutronclient.neutron import v2_0 as neutronV20
from neutronclient.v2_0 import client as neutronclient from neutronclient.v2_0 import client as neutronclient
import six
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -12,10 +12,10 @@
# under the License. # under the License.
import copy import copy
from neutronclient.v2_0 import client as neutronclient
import uuid import uuid
import mox import mox
from neutronclient.v2_0 import client as neutronclient
from oslo.config import cfg from oslo.config import cfg
from heat.common import template_format from heat.common import template_format

View File

@ -12,10 +12,10 @@
# under the License. # under the License.
import copy import copy
import six
from neutronclient.common import exceptions from neutronclient.common import exceptions
from neutronclient.v2_0 import client as neutronclient from neutronclient.v2_0 import client as neutronclient
import six
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -12,13 +12,13 @@
# under the License. # under the License.
import copy import copy
import mox
from oslo.config import cfg
import six
import mox
from neutronclient.common import exceptions from neutronclient.common import exceptions
from neutronclient.neutron import v2_0 as neutronV20 from neutronclient.neutron import v2_0 as neutronV20
from neutronclient.v2_0 import client as neutronclient from neutronclient.v2_0 import client as neutronclient
from oslo.config import cfg
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import mox import mox
from neutronclient.common import exceptions from neutronclient.common import exceptions
from neutronclient.neutron import v2_0 as neutronV20 from neutronclient.neutron import v2_0 as neutronV20

View File

@ -13,11 +13,12 @@
"""Tests for :module:'heat.engine.resources.nova_utls'.""" """Tests for :module:'heat.engine.resources.nova_utls'."""
import collections import collections
import uuid
import mock import mock
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions
from oslo.config import cfg from oslo.config import cfg
import six import six
import uuid
from heat.common import exception from heat.common import exception
from heat.engine.clients.os import nova from heat.engine.clients.os import nova

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import mock import mock
import six import six

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import mock import mock
import six import six

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import json import json
import mock import mock
from heat.common import template_format from heat.common import template_format

View File

@ -13,11 +13,11 @@
"""Tests for :module:'heat.engine.resources.nova_utls'.""" """Tests for :module:'heat.engine.resources.nova_utls'."""
import mock
import six
import uuid import uuid
import mock
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions
import six
from heat.common import exception from heat.common import exception
from heat.engine.resources import nova_utils from heat.engine.resources import nova_utils

View File

@ -12,8 +12,8 @@
# under the License. # under the License.
import json import json
import six
import six
import testtools import testtools
from heat.common import exception from heat.common import exception

View File

@ -15,13 +15,13 @@ import collections
import copy import copy
import json import json
import time import time
import warnings
from keystoneclient import exceptions as kc_exceptions from keystoneclient import exceptions as kc_exceptions
import mock import mock
import mox import mox
from oslo.config import cfg from oslo.config import cfg
import six import six
import warnings
from heat.common import context from heat.common import context
from heat.common import exception from heat.common import exception

View File

@ -13,10 +13,10 @@
import json import json
import os import os
import six
import uuid import uuid
import mock import mock
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,12 +12,12 @@
# under the License. # under the License.
import copy import copy
import mock
import six
from heatclient import exc from heatclient import exc
from heatclient.v1 import stacks from heatclient.v1 import stacks
import mock
from oslo.config import cfg from oslo.config import cfg
import six
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,9 +12,10 @@
# under the License. # under the License.
import copy import copy
import uuid
import mock import mock
import six import six
import uuid
from heat.common import exception from heat.common import exception
from heat.engine import properties from heat.engine import properties

View File

@ -17,8 +17,8 @@
Unit Tests for heat.rpc.client Unit Tests for heat.rpc.client
""" """
import copy import copy
import mock import mock
from oslo.messaging._drivers import common as rpc_common from oslo.messaging._drivers import common as rpc_common
import stubout import stubout

View File

@ -13,13 +13,12 @@
import six import six
from heat.tests import common
from heat.common import exception from heat.common import exception
from heat.engine.cfn import functions as cfn_funcs from heat.engine.cfn import functions as cfn_funcs
from heat.engine.hot import functions as hot_funcs from heat.engine.hot import functions as hot_funcs
from heat.engine import properties from heat.engine import properties
from heat.engine import rsrc_defn from heat.engine import rsrc_defn
from heat.tests import common
class ResourceDefinitionTest(common.HeatTestCase): class ResourceDefinitionTest(common.HeatTestCase):

View File

@ -13,13 +13,13 @@
import collections import collections
import copy import copy
from oslo.utils import uuidutils
import six
from six.moves.urllib import parse as urlparse
import mock import mock
import mox import mox
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions
from oslo.utils import uuidutils
import six
from six.moves.urllib import parse as urlparse
from heat.common import exception from heat.common import exception
from heat.common.i18n import _ from heat.common.i18n import _

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import copy import copy
import mock import mock
import six import six

View File

@ -13,12 +13,12 @@
import datetime import datetime
import json import json
import six
import uuid import uuid
import mock import mock
import mox import mox
from oslo.utils import timeutils from oslo.utils import timeutils
import six
from heat.common import context from heat.common import context
from heat.common import exception from heat.common import exception

View File

@ -11,10 +11,10 @@
# 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 six
import uuid import uuid
import mock import mock
import six
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format

View File

@ -11,9 +11,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 six
from keystoneclient import exceptions as kc_exceptions from keystoneclient import exceptions as kc_exceptions
import six
from heat.common import exception from heat.common import exception
from heat.common import short_id from heat.common import short_id

View File

@ -16,9 +16,9 @@
import json import json
import six
from oslo.config import cfg from oslo.config import cfg
import six
import stubout import stubout
import webob import webob

View File

@ -15,11 +15,10 @@
# limitations under the License. # limitations under the License.
import mock import mock
import requests
from novaclient import client as base_client from novaclient import client as base_client
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions
from novaclient.v1_1 import client from novaclient.v1_1 import client
import requests
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from heat.tests import fakes from heat.tests import fakes

View File

@ -12,13 +12,14 @@
import cStringIO import cStringIO
import logging import logging
import paramiko
import re import re
import select import select
import six
import socket import socket
import time import time
import paramiko
import six
from heat_integrationtests.common import exceptions from heat_integrationtests.common import exceptions
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -10,19 +10,19 @@
# 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 fixtures
import logging import logging
import os import os
import random import random
import re import re
import six
import subprocess import subprocess
import testscenarios
import testtools
import time import time
import fixtures
from heatclient import exc as heat_exceptions from heatclient import exc as heat_exceptions
from oslo.utils import timeutils from oslo.utils import timeutils
import six
import testscenarios
import testtools
from heat_integrationtests.common import clients from heat_integrationtests.common import clients
from heat_integrationtests.common import config from heat_integrationtests.common import config

View File

@ -11,10 +11,11 @@
# under the License. # under the License.
import logging import logging
from heatclient import exc
import six import six
from heat_integrationtests.common import test from heat_integrationtests.common import test
from heatclient import exc
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -10,9 +10,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 six
from heatclient import exc from heatclient import exc
import six
from heat_integrationtests.common import test from heat_integrationtests.common import test

View File

@ -12,6 +12,7 @@
import json import json
import logging import logging
import yaml import yaml
from heat_integrationtests.common import test from heat_integrationtests.common import test

View File

@ -11,10 +11,10 @@
# under the License. # under the License.
import logging import logging
import six
from testtools import testcase
from cinderclient import exceptions as cinder_exceptions from cinderclient import exceptions as cinder_exceptions
import six
from testtools import testcase
from heat_integrationtests.common import exceptions from heat_integrationtests.common import exceptions
from heat_integrationtests.common import test from heat_integrationtests.common import test

View File

@ -52,13 +52,11 @@ commands = python setup.py build_sphinx
commands = oslo-config-generator --config-file=config-generator.conf commands = oslo-config-generator --config-file=config-generator.conf
[flake8] [flake8]
# H305 imports not grouped correctly
# H307 like imports should be grouped togethe
# H404 multi line docstring should start with a summary # H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line # H405 multi line docstring summary not separated with an empty line
# H803 no full stop at the end of the commit message # H803 no full stop at the end of the commit message
# H904 Wrap long lines in parentheses instead of a backslash # H904 Wrap long lines in parentheses instead of a backslash
ignore = H305,H307,H404,H405,H803,H904 ignore = H404,H405,H803,H904
show-source = true show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
max-complexity=20 max-complexity=20