Resolve H305 pep8 issue

H305  imports not grouped correctly

Change-Id: Ia990dd628da195097838a13d876ef987363d3f8e
This commit is contained in:
Ekaterina Chernova
2015-02-04 17:10:06 +03:00
parent 8a15466301
commit 87a63bf24e
22 changed files with 43 additions and 25 deletions

View File

@@ -14,10 +14,10 @@
# under the License. # under the License.
import cgi import cgi
import jsonschema
import os import os
import tempfile import tempfile
import jsonschema
from oslo.config import cfg from oslo.config import cfg
from oslo.db import exception as db_exc from oslo.db import exception as db_exc
from webob import exc from webob import exc

View File

@@ -14,10 +14,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 os import os
import sys import sys
import eventlet
if os.name == 'nt': if os.name == 'nt':
# eventlet monkey patching causes subprocess.Popen to fail on Windows # eventlet monkey patching causes subprocess.Popen to fail on Windows
# when using pipes due to missing non blocking I/O support # when using pipes due to missing non blocking I/O support

View File

@@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import logging import logging
from oslo.serialization import jsonutils from oslo.serialization import jsonutils
log = logging.getLogger("murano-common.messaging") log = logging.getLogger("murano-common.messaging")

View File

@@ -14,11 +14,12 @@
# Based on designate/policy.py # Based on designate/policy.py
import murano.openstack.common.log as logging
from murano.openstack.common import policy
from oslo.config import cfg from oslo.config import cfg
from webob import exc as exceptions from webob import exc as exceptions
import murano.openstack.common.log as logging
from murano.openstack.common import policy
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF

View File

@@ -12,16 +12,17 @@
# 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 json import json
import psutil
import socket import socket
import time import time
import eventlet
import psutil
from murano.api import v1 from murano.api import v1
from murano.api.v1 import request_statistics from murano.api.v1 import request_statistics
from murano.common import config from murano.common import config
from murano.db.services import stats as db_stats from murano.db.services import stats as db_stats
from murano.openstack.common.gettextutils import _ from murano.openstack.common.gettextutils import _
from murano.openstack.common import log as logging from murano.openstack.common import log as logging

View File

@@ -15,26 +15,25 @@
"""Utility methods for working with WSGI servers.""" """Utility methods for working with WSGI servers."""
import eventlet
eventlet.patcher.monkey_patch(all=False, socket=True)
import datetime import datetime
import errno import errno
import jsonschema
import re import re
import socket import socket
import sys import sys
import time import time
from xml.dom import minidom
from xml.parsers import expat
import eventlet
eventlet.patcher.monkey_patch(all=False, socket=True)
import eventlet.wsgi import eventlet.wsgi
import jsonschema
from oslo.config import cfg from oslo.config import cfg
from oslo.serialization import jsonutils from oslo.serialization import jsonutils
import routes import routes
import routes.middleware import routes.middleware
import webob.dec import webob.dec
import webob.exc import webob.exc
from xml.dom import minidom
from xml.parsers import expat
from murano.api.v1 import schemas from murano.api.v1 import schemas
from murano.common import xmlutils from murano.common import xmlutils

View File

@@ -23,11 +23,12 @@ Create Date: 2014-05-29 16:32:33.698760
revision = '001' revision = '001'
down_revision = None down_revision = None
import uuid
from alembic import op from alembic import op
from oslo.utils import timeutils from oslo.utils import timeutils
import sqlalchemy as sa import sqlalchemy as sa
from sqlalchemy.sql.expression import table as sa_table from sqlalchemy.sql.expression import table as sa_table
import uuid
from murano.common import consts from murano.common import consts
from murano.db.sqla import types as st from murano.db.sqla import types as st

View File

@@ -24,10 +24,10 @@ revision = '004'
down_revision = '003' down_revision = '003'
from alembic import op from alembic import op
from murano.db.sqla import types as st
import sqlalchemy as sa import sqlalchemy as sa
import murano.db.migration.helpers as helpers import murano.db.migration.helpers as helpers
from murano.db.sqla import types as st
MYSQL_ENGINE = 'InnoDB' MYSQL_ENGINE = 'InnoDB'
MYSQL_CHARSET = 'utf8' MYSQL_CHARSET = 'utf8'

View File

@@ -15,12 +15,12 @@
import copy import copy
import datetime import datetime
import logging
import os import os
import types import types
import uuid import uuid
import eventlet.event import eventlet.event
import logging
import murano.common.config as config import murano.common.config as config
import murano.common.messaging as messaging import murano.common.messaging as messaging

View File

@@ -13,9 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import eventlet
import json import json
import eventlet
import murano.dsl.helpers as helpers import murano.dsl.helpers as helpers
import murano.dsl.murano_class as murano_class import murano.dsl.murano_class as murano_class
import murano.dsl.murano_object as murano_object import murano.dsl.murano_object as murano_object

View File

@@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import json as jsonlib import json as jsonlib
import yaml as yamllib import yaml as yamllib
import murano.dsl.helpers as helpers import murano.dsl.helpers as helpers

View File

@@ -15,13 +15,13 @@
import base64 import base64
import collections import collections
import itertools
import random import random
import re import re
import string import string
import time import time
import types import types
import itertools
import jsonpatch import jsonpatch
import jsonpointer import jsonpointer
import yaql.context import yaql.context

View File

@@ -16,6 +16,7 @@ import os
import shutil import shutil
import sys import sys
import types import types
import yaml import yaml
from murano.dsl import yaql_expression from murano.dsl import yaql_expression

View File

@@ -16,9 +16,10 @@ import os
import shutil import shutil
import sys import sys
import tempfile import tempfile
import yaml
import zipfile import zipfile
import yaml
from murano.engine import yaql_yaml_loader from murano.engine import yaql_yaml_loader
import murano.packages.application_package import murano.packages.application_package
import murano.packages.exceptions as e import murano.packages.exceptions as e

View File

@@ -14,6 +14,7 @@
import os import os
import sys import sys
import yaml import yaml
import murano.packages.application_package import murano.packages.application_package

View File

@@ -13,12 +13,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import fixtures
import logging import logging
import urllib
import fixtures
import mock import mock
from oslo.utils import timeutils from oslo.utils import timeutils
import routes import routes
import urllib
import webob import webob
from murano.api.v1 import request_statistics from murano.api.v1 import request_statistics

View File

@@ -16,9 +16,10 @@
import cgi import cgi
import cStringIO import cStringIO
import imghdr import imghdr
import mock
import os import os
import mock
from murano.api.v1 import catalog from murano.api.v1 import catalog
from murano.common import policy from murano.common import policy
from murano.db.catalog import api as db_catalog_api from murano.db.catalog import api as db_catalog_api

View File

@@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import json import json
from oslo.utils import timeutils from oslo.utils import timeutils
from murano.api.v1 import environments from murano.api.v1 import environments

View File

@@ -14,6 +14,7 @@
import fnmatch import fnmatch
import os.path import os.path
import yaml import yaml
from murano.dsl import class_loader from murano.dsl import class_loader

View File

@@ -10,10 +10,13 @@
# 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 imghdr import imghdr
import os
import murano.packages.load_utils as load_utils import murano.packages.load_utils as load_utils
import murano.tests.unit.base as test_base import murano.tests.unit.base as test_base
import os
class TestHotV1(test_base.MuranoTestCase): class TestHotV1(test_base.MuranoTestCase):

View File

@@ -15,6 +15,7 @@
import inspect import inspect
import os.path import os.path
import unittest2 as unittest import unittest2 as unittest
import yaml import yaml

View File

@@ -40,13 +40,12 @@ commands = oslo-config-generator --config-file etc/oslo-config-generator/murano.
[flake8] [flake8]
# H233 Python 3.x incompatible use of print operator # H233 Python 3.x incompatible use of print operator
# E265 block comment should start with '# ' # E265 block comment should start with '# '
# H305 imports not grouped correctly
# H307 like imports should be grouped together # H307 like imports should be grouped together
# H405 Multi line docstring summary not separated with an empty line # H405 Multi line docstring summary not separated with an empty line
# H702 Argument to _ must be just a string # H702 Argument to _ must be just a string
# H904 Wrap long lines in parentheses instead of a backslash # H904 Wrap long lines in parentheses instead of a backslash
ignore = H233,H305,H307,E265,H405,H702,H904 ignore = H233,H307,E265,H405,H702,H904
show-source = true show-source = true
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools