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:
parent
3017e1d824
commit
8b2b0b743e
|
@ -17,7 +17,7 @@ import base64
|
||||||
from Crypto.Hash import HMAC
|
from Crypto.Hash import HMAC
|
||||||
from Crypto import Random
|
from Crypto import Random
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import importutils
|
from openstack.common import importutils
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
"""DB related custom exceptions."""
|
"""DB related custom exceptions."""
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
|
|
||||||
|
|
||||||
class DBError(Exception):
|
class DBError(Exception):
|
||||||
|
|
|
@ -52,7 +52,7 @@ from sqlalchemy.schema import UniqueConstraint
|
||||||
|
|
||||||
from openstack.common.db import exception
|
from openstack.common.db import exception
|
||||||
from openstack.common.db.sqlalchemy import session as db_session
|
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
|
get_engine = db_session.get_engine
|
||||||
|
|
|
@ -284,7 +284,7 @@ from sqlalchemy.pool import NullPool, StaticPool
|
||||||
from sqlalchemy.sql.expression import literal_column
|
from sqlalchemy.sql.expression import literal_column
|
||||||
|
|
||||||
from openstack.common.db import exception
|
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 log as logging
|
||||||
from openstack.common import timeutils
|
from openstack.common import timeutils
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ from six import moves
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
import sqlalchemy.exc
|
import sqlalchemy.exc
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common.py3kcompat import urlutils
|
from openstack.common.py3kcompat import urlutils
|
||||||
from openstack.common import test
|
from openstack.common import test
|
||||||
|
|
|
@ -36,7 +36,7 @@ from sqlalchemy import String
|
||||||
from sqlalchemy import Table
|
from sqlalchemy import Table
|
||||||
from sqlalchemy.types import NullType
|
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 log as logging
|
||||||
from openstack.common import timeutils
|
from openstack.common import timeutils
|
||||||
|
|
|
@ -29,7 +29,7 @@ import eventlet.backdoor
|
||||||
import greenlet
|
import greenlet
|
||||||
from oslo.config import cfg
|
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 import log as logging
|
||||||
|
|
||||||
help_for_backdoor_port = (
|
help_for_backdoor_port = (
|
||||||
|
|
|
@ -24,7 +24,7 @@ import traceback
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
|
|
||||||
|
|
||||||
class save_and_reraise_exception(object):
|
class save_and_reraise_exception(object):
|
||||||
|
|
|
@ -20,7 +20,7 @@ import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from openstack.common import excutils
|
from openstack.common import excutils
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
|
@ -19,7 +19,7 @@ gettext for openstack-common modules.
|
||||||
|
|
||||||
Usual usage in an openstack.common module:
|
Usual usage in an openstack.common module:
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
|
@ -21,7 +21,7 @@ Helper methods to deal with images.
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import strutils
|
from openstack.common import strutils
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import weakref
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common import fileutils
|
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 local
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import importutils
|
from openstack.common import importutils
|
||||||
from openstack.common import jsonutils
|
from openstack.common import jsonutils
|
||||||
from openstack.common import local
|
from openstack.common import local
|
||||||
|
|
|
@ -20,7 +20,7 @@ import sys
|
||||||
from eventlet import event
|
from eventlet import event
|
||||||
from eventlet import greenthread
|
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 log as logging
|
||||||
from openstack.common import timeutils
|
from openstack.common import timeutils
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import six
|
||||||
import webob.dec
|
import webob.dec
|
||||||
|
|
||||||
from openstack.common import context
|
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 import log as logging
|
||||||
from openstack.common.middleware import base
|
from openstack.common.middleware import base
|
||||||
from openstack.common.notifier import api
|
from openstack.common.notifier import api
|
||||||
|
|
|
@ -20,7 +20,7 @@ from oslo.config import cfg
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common.middleware import base
|
from openstack.common.middleware import base
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import uuid
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common import context
|
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 importutils
|
||||||
from openstack.common import jsonutils
|
from openstack.common import jsonutils
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common import context as req_context
|
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 log as logging
|
||||||
from openstack.common import rpc
|
from openstack.common import rpc
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common import context as req_context
|
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 log as logging
|
||||||
from openstack.common import rpc
|
from openstack.common import rpc
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import time
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common import timeutils
|
from openstack.common import timeutils
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common import fileutils
|
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 jsonutils
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common.py3kcompat import urlutils
|
from openstack.common.py3kcompat import urlutils
|
||||||
|
|
|
@ -26,7 +26,7 @@ import signal
|
||||||
from eventlet.green import subprocess
|
from eventlet.green import subprocess
|
||||||
from eventlet import greenthread
|
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 log as logging
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import datetime
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import importutils
|
from openstack.common import importutils
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common import timeutils
|
from openstack.common import timeutils
|
||||||
|
|
|
@ -27,7 +27,7 @@ import inspect
|
||||||
|
|
||||||
from oslo.config import cfg
|
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 importutils
|
||||||
from openstack.common import local
|
from openstack.common import local
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
|
@ -37,7 +37,7 @@ import six
|
||||||
|
|
||||||
|
|
||||||
from openstack.common import excutils
|
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 local
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common.rpc import common as rpc_common
|
from openstack.common.rpc import common as rpc_common
|
||||||
|
|
|
@ -22,7 +22,7 @@ import traceback
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import importutils
|
from openstack.common import importutils
|
||||||
from openstack.common import jsonutils
|
from openstack.common import jsonutils
|
||||||
from openstack.common import local
|
from openstack.common import local
|
||||||
|
|
|
@ -29,7 +29,7 @@ from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common import excutils
|
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 import network_utils
|
||||||
from openstack.common.rpc import amqp as rpc_amqp
|
from openstack.common.rpc import amqp as rpc_amqp
|
||||||
from openstack.common.rpc import common as rpc_common
|
from openstack.common.rpc import common as rpc_common
|
||||||
|
|
|
@ -23,7 +23,7 @@ from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common import excutils
|
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 importutils
|
||||||
from openstack.common import jsonutils
|
from openstack.common import jsonutils
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
|
@ -27,7 +27,7 @@ import six
|
||||||
from six import moves
|
from six import moves
|
||||||
|
|
||||||
from openstack.common import excutils
|
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 importutils
|
||||||
from openstack.common import jsonutils
|
from openstack.common import jsonutils
|
||||||
from openstack.common.rpc import common as rpc_common
|
from openstack.common.rpc import common as rpc_common
|
||||||
|
|
|
@ -21,7 +21,7 @@ import contextlib
|
||||||
import eventlet
|
import eventlet
|
||||||
from oslo.config import cfg
|
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 import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import json
|
||||||
|
|
||||||
from oslo.config import cfg
|
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 import log as logging
|
||||||
from openstack.common.rpc import matchmaker as mm
|
from openstack.common.rpc import matchmaker as mm
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 log as logging
|
||||||
from openstack.common import rpc
|
from openstack.common import rpc
|
||||||
from openstack.common.rpc import dispatcher as rpc_dispatcher
|
from openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||||
|
|
|
@ -38,7 +38,7 @@ from eventlet import event
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common import eventlet_backdoor
|
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 importutils
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
from openstack.common import threadgroup
|
from openstack.common import threadgroup
|
||||||
|
|
|
@ -17,7 +17,7 @@ import ssl
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
|
|
||||||
|
|
||||||
ssl_opts = [
|
ssl_opts = [
|
||||||
|
|
|
@ -23,7 +23,7 @@ import unicodedata
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
|
|
||||||
|
|
||||||
# Used for looking up extensions of text
|
# Used for looking up extensions of text
|
||||||
|
|
|
@ -20,7 +20,7 @@ Helpers for comparing version strings.
|
||||||
import functools
|
import functools
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from openstack.common import log as logging
|
from openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import time
|
||||||
import eventlet
|
import eventlet
|
||||||
|
|
||||||
from openstack.common.fixture import config
|
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 common as rpc_common
|
||||||
from openstack.common.rpc import dispatcher as rpc_dispatcher
|
from openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||||
from openstack.common import test
|
from openstack.common import test
|
||||||
|
|
|
@ -28,7 +28,7 @@ from six import moves
|
||||||
|
|
||||||
from openstack.common.fixture import config
|
from openstack.common.fixture import config
|
||||||
from openstack.common.fixture import moxstubout
|
from openstack.common.fixture import moxstubout
|
||||||
from openstack.common.gettextutils import _ # noqa
|
from openstack.common.gettextutils import _
|
||||||
from tests.unit.rpc import common
|
from tests.unit.rpc import common
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue