Use hacking import_exceptions for gettextutils._

Instead of using # noqa every time gettextutils._ is used, add an
exception in tox.ini

Change-Id: Iafa8509a38596aac791bd809283f3bd75c638a60
This commit is contained in:
Joe Gordon 2013-12-20 18:11:50 -08:00
parent 3017e1d824
commit 8b2b0b743e
39 changed files with 42 additions and 38 deletions

View File

@ -17,7 +17,7 @@ import base64
from Crypto.Hash import HMAC
from Crypto import Random
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils

View File

@ -16,7 +16,7 @@
"""DB related custom exceptions."""
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
class DBError(Exception):

View File

@ -52,7 +52,7 @@ from sqlalchemy.schema import UniqueConstraint
from openstack.common.db import exception
from openstack.common.db.sqlalchemy import session as db_session
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
get_engine = db_session.get_engine

View File

@ -284,7 +284,7 @@ from sqlalchemy.pool import NullPool, StaticPool
from sqlalchemy.sql.expression import literal_column
from openstack.common.db import exception
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils

View File

@ -23,7 +23,7 @@ from six import moves
import sqlalchemy
import sqlalchemy.exc
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common.py3kcompat import urlutils
from openstack.common import test

View File

@ -36,7 +36,7 @@ from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.types import NullType
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils

View File

@ -29,7 +29,7 @@ import eventlet.backdoor
import greenlet
from oslo.config import cfg
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
help_for_backdoor_port = (

View File

@ -24,7 +24,7 @@ import traceback
import six
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
class save_and_reraise_exception(object):

View File

@ -20,7 +20,7 @@ import os
import tempfile
from openstack.common import excutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@ gettext for openstack-common modules.
Usual usage in an openstack.common module:
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
"""
import copy

View File

@ -21,7 +21,7 @@ Helper methods to deal with images.
import re
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import strutils

View File

@ -29,7 +29,7 @@ import weakref
from oslo.config import cfg
from openstack.common import fileutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import local
from openstack.common import log as logging

View File

@ -41,7 +41,7 @@ from oslo.config import cfg
import six
from six import moves
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import jsonutils
from openstack.common import local

View File

@ -20,7 +20,7 @@ import sys
from eventlet import event
from eventlet import greenthread
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils

View File

@ -23,7 +23,7 @@ import six
import webob.dec
from openstack.common import context
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common.middleware import base
from openstack.common.notifier import api

View File

@ -20,7 +20,7 @@ from oslo.config import cfg
import webob.dec
import webob.exc
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common.middleware import base

View File

@ -19,7 +19,7 @@ import uuid
from oslo.config import cfg
from openstack.common import context
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import jsonutils
from openstack.common import log as logging

View File

@ -16,7 +16,7 @@
from oslo.config import cfg
from openstack.common import context as req_context
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import rpc

View File

@ -18,7 +18,7 @@
from oslo.config import cfg
from openstack.common import context as req_context
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import rpc

View File

@ -17,7 +17,7 @@ import time
from oslo.config import cfg
import six
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils

View File

@ -61,7 +61,7 @@ from oslo.config import cfg
import six
from openstack.common import fileutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import jsonutils
from openstack.common import log as logging
from openstack.common.py3kcompat import urlutils

View File

@ -26,7 +26,7 @@ import signal
from eventlet.green import subprocess
from eventlet import greenthread
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging

View File

@ -21,7 +21,7 @@ import datetime
from oslo.config import cfg
import six
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import log as logging
from openstack.common import timeutils

View File

@ -27,7 +27,7 @@ import inspect
from oslo.config import cfg
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import local
from openstack.common import log as logging

View File

@ -37,7 +37,7 @@ import six
from openstack.common import excutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import local
from openstack.common import log as logging
from openstack.common.rpc import common as rpc_common

View File

@ -22,7 +22,7 @@ import traceback
from oslo.config import cfg
import six
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import jsonutils
from openstack.common import local

View File

@ -29,7 +29,7 @@ from oslo.config import cfg
import six
from openstack.common import excutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import network_utils
from openstack.common.rpc import amqp as rpc_amqp
from openstack.common.rpc import common as rpc_common

View File

@ -23,7 +23,7 @@ from oslo.config import cfg
import six
from openstack.common import excutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import jsonutils
from openstack.common import log as logging

View File

@ -27,7 +27,7 @@ import six
from six import moves
from openstack.common import excutils
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import jsonutils
from openstack.common.rpc import common as rpc_common

View File

@ -21,7 +21,7 @@ import contextlib
import eventlet
from oslo.config import cfg
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging

View File

@ -21,7 +21,7 @@ import json
from oslo.config import cfg
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common.rpc import matchmaker as mm

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import rpc
from openstack.common.rpc import dispatcher as rpc_dispatcher

View File

@ -38,7 +38,7 @@ from eventlet import event
from oslo.config import cfg
from openstack.common import eventlet_backdoor
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import importutils
from openstack.common import log as logging
from openstack.common import threadgroup

View File

@ -17,7 +17,7 @@ import ssl
from oslo.config import cfg
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
ssl_opts = [

View File

@ -23,7 +23,7 @@ import unicodedata
import six
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
# Used for looking up extensions of text

View File

@ -20,7 +20,7 @@ Helpers for comparing version strings.
import functools
import pkg_resources
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common import log as logging

View File

@ -24,7 +24,7 @@ import time
import eventlet
from openstack.common.fixture import config
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from openstack.common.rpc import common as rpc_common
from openstack.common.rpc import dispatcher as rpc_dispatcher
from openstack.common import test

View File

@ -28,7 +28,7 @@ from six import moves
from openstack.common.fixture import config
from openstack.common.fixture import moxstubout
from openstack.common.gettextutils import _ # noqa
from openstack.common.gettextutils import _
from tests.unit.rpc import common
try:

View File

@ -41,3 +41,7 @@ commands = {posargs}
[testenv:pyflakes]
commands = flake8
[hacking]
import_exceptions = openstack.common.gettextutils._