Merge "Remove useless imports, reenable F401 checks"

This commit is contained in:
Jenkins 2013-06-11 18:28:15 +00:00 committed by Gerrit Code Review
commit 85b1137c97
12 changed files with 11 additions and 32 deletions

View File

@ -20,8 +20,6 @@
from keystoneclient.middleware import auth_token
from oslo.config import cfg
from pecan import hooks
from webob import exc
from ceilometer import policy

View File

@ -29,15 +29,9 @@ from ceilometer.openstack.common import service as os_service
from ceilometer.openstack.common.rpc import dispatcher as rpc_dispatcher
from ceilometer.openstack.common.rpc import service as rpc_service
# Import rpc_notifier to register `notification_topics` flag so that
# plugins can use it
# FIXME(dhellmann): Use option importing feature of oslo.config instead.
import ceilometer.openstack.common.notifier.rpc_notifier
from ceilometer.openstack.common import timeutils
from ceilometer import pipeline
from ceilometer import publisher
from ceilometer import service
from ceilometer import storage
from ceilometer import transformer

View File

@ -25,7 +25,8 @@ from nova.openstack.common import log as logging
# HACK(dhellmann): Insert the nova version of openstack.common into
# sys.modules as though it was the copy from ceilometer, so that when
# we use modules from ceilometer below they do not re-define options.
import ceilometer # use the real ceilometer base package
# use the real ceilometer base package
import ceilometer # noqa
for name in ['openstack', 'openstack.common', 'openstack.common.log']:
sys.modules['ceilometer.' + name] = sys.modules['nova.' + name]

View File

@ -20,7 +20,8 @@ from novaclient.v1_1 import client as nova_client
from oslo.config import cfg
from ceilometer.openstack.common import log
from ceilometer import service # For cfg.CONF.os_*
cfg.CONF.import_group('service_credentials', 'ceilometer.service')
LOG = log.getLogger(__name__)

View File

@ -20,6 +20,11 @@
import abc
import collections
from oslo.config import cfg
# Import this option so every Notification plugin can use it freely.
cfg.CONF.import_opt('notification_topics',
'ceilometer.openstack.common.notifier.rpc_notifier')
ExchangeTopics = collections.namedtuple('ExchangeTopics',

View File

@ -27,7 +27,6 @@ import datetime
import happybase
import os
import re
from collections import defaultdict
from oslo.config import cfg

View File

@ -579,7 +579,7 @@ def require_map_reduce(conn):
# map-reduce functions, so if we can't import it then just
# skip these tests unless we aren't using mim.
try:
import spidermonkey
import spidermonkey # noqa
except BaseException:
try:
from ming import mim

View File

@ -18,7 +18,6 @@
"""Base classes for API tests.
"""
import os
import urllib
import flask

View File

@ -18,15 +18,9 @@
"""Tests for ceilometer/central/manager.py
"""
import datetime
import mock
from oslo.config import cfg
from stevedore import extension
from ceilometer.central import manager
from ceilometer import counter
from ceilometer.tests import base
from keystoneclient.v2_0 import client as ksclient
from tests import agentbase

View File

@ -17,20 +17,10 @@
# under the License.
"""Tests for ceilometer/agent/manager.py
"""
import datetime
import mock
from oslo.config import cfg
from stevedore import extension
from stevedore.tests import manager as extension_tests
from stevedore import dispatch
from ceilometer import nova_client
from ceilometer.compute import manager
from ceilometer import counter
from ceilometer import pipeline
from ceilometer.tests import base
from tests import agentbase

View File

@ -19,11 +19,9 @@
"""
import datetime
import functools
import mock
import msgpack
from oslo.config import cfg
import socket
from ceilometer import counter
from ceilometer.publisher import udp

View File

@ -39,7 +39,7 @@ deps = -r{toxinidir}/requirements.txt
commands = {posargs}
[flake8]
ignore = E125,F401,F403,H301,H302,H304,H306,H401,H402,H403,H404,H703
ignore = E125,F403,H301,H302,H304,H306,H401,H402,H403,H404,H703
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,nova_tests
show-source = True