Fix hacking rule H305 imports not grouped correctly
The recommended group order is: import stdlib_1 import stdlib_2 import third_party_lib_1 import third_party_lib_2 import project_lib_1 import project_lib_2 Change-Id: If2e22b25b80d6c399a872df307d7f4c58a73795f
This commit is contained in:
parent
89861616f2
commit
ef3772ed26
@ -17,10 +17,10 @@
|
||||
|
||||
|
||||
import abc
|
||||
import croniter
|
||||
import datetime
|
||||
|
||||
from ceilometerclient import client as ceiloclient
|
||||
import croniter
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
import pytz
|
||||
|
@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
@ -27,21 +27,21 @@
|
||||
import ast
|
||||
import base64
|
||||
import copy
|
||||
import croniter
|
||||
import datetime
|
||||
import functools
|
||||
import inspect
|
||||
import json
|
||||
import jsonschema
|
||||
import pytz
|
||||
import uuid
|
||||
|
||||
import croniter
|
||||
import jsonschema
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import netutils
|
||||
from oslo.utils import strutils
|
||||
from oslo.utils import timeutils
|
||||
import pecan
|
||||
from pecan import rest
|
||||
import pytz
|
||||
import six
|
||||
import wsme
|
||||
from wsme import types as wtypes
|
||||
|
@ -20,6 +20,7 @@
|
||||
"""
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from ceilometer.compute import notifications
|
||||
|
@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
import abc
|
||||
import itertools
|
||||
|
||||
from oslo.utils import netutils
|
||||
import six
|
||||
|
||||
|
@ -28,10 +28,11 @@ import binascii
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.ipmi.platform import exception as nmexcept
|
||||
from ceilometer.ipmi.platform import ipmitool
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
def get_ordereddict():
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
import copy
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
import ceilometer
|
||||
|
@ -19,12 +19,12 @@
|
||||
"""
|
||||
|
||||
import time
|
||||
import weakref
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import netutils
|
||||
import pymongo
|
||||
import six
|
||||
import weakref
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import log
|
||||
|
@ -17,17 +17,17 @@
|
||||
"""Tests for ceilometer/alarm/threshold_evaluation.py
|
||||
"""
|
||||
import datetime
|
||||
import mock
|
||||
import pytz
|
||||
import uuid
|
||||
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.v2 import alarms
|
||||
import mock
|
||||
from oslo.utils import timeutils
|
||||
import pytz
|
||||
|
||||
from ceilometer.alarm.evaluator import combination
|
||||
from ceilometer.alarm.storage import models
|
||||
from ceilometer.tests.alarm.evaluator import base
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.v2 import alarms
|
||||
|
||||
|
||||
class TestEvaluate(base.TestEvaluatorBase):
|
||||
|
@ -17,19 +17,19 @@
|
||||
"""Tests for ceilometer/alarm/evaluator/threshold.py
|
||||
"""
|
||||
import datetime
|
||||
import mock
|
||||
import pytz
|
||||
import uuid
|
||||
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.v2 import statistics
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
import pytz
|
||||
from six import moves
|
||||
|
||||
from ceilometer.alarm.evaluator import threshold
|
||||
from ceilometer.alarm.storage import models
|
||||
from ceilometer.tests.alarm.evaluator import base
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.v2 import statistics
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
class TestEvaluate(base.TestEvaluatorBase):
|
||||
|
@ -17,6 +17,7 @@
|
||||
"""Tests for ceilometer.alarm.service.PartitionedAlarmService.
|
||||
"""
|
||||
import contextlib
|
||||
|
||||
import mock
|
||||
from oslo.config import fixture as fixture_config
|
||||
from stevedore import extension
|
||||
|
@ -18,11 +18,11 @@
|
||||
# under the License.
|
||||
|
||||
"""Base classes for API tests."""
|
||||
import fixtures
|
||||
import os
|
||||
import uuid
|
||||
import warnings
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo.config import fixture as fixture_config
|
||||
from oslotest import mockpatch
|
||||
|
@ -15,14 +15,14 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
|
||||
import mock
|
||||
from oslotest import mockpatch
|
||||
import six
|
||||
|
||||
from ceilometer.ipmi import manager
|
||||
import ceilometer.tests.base as base
|
||||
|
||||
from oslotest import mockpatch
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class TestPollsterBase(base.BaseTestCase):
|
||||
|
@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
|
||||
import mock
|
||||
from oslo.config import fixture as fixture_config
|
||||
import tooz.coordination
|
||||
|
@ -27,12 +27,13 @@ import hashlib
|
||||
import multiprocessing
|
||||
import struct
|
||||
|
||||
from ceilometer.openstack.common import processutils
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo.utils import units
|
||||
import six
|
||||
|
||||
from ceilometer.openstack.common import processutils
|
||||
|
||||
OPTS = [
|
||||
cfg.StrOpt('rootwrap_config',
|
||||
default="/etc/ceilometer/rootwrap.conf",
|
||||
|
3
tox.ini
3
tox.ini
@ -68,8 +68,7 @@ commands =
|
||||
bash -x {toxinidir}/setup-test-env-mysql.sh oslo_debug_helper {posargs}
|
||||
|
||||
[flake8]
|
||||
# H305 imports not grouped correctly
|
||||
ignore = H305
|
||||
ignore =
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,./ceilometer/openstack/common,*lib/python*,*egg,tools,nova_tests,build
|
||||
show-source = True
|
||||
|
Loading…
Reference in New Issue
Block a user