inherit from object is not required for py3
Change-Id: I3f3b1dca78e2e9b2515231ccc6600b64f31039fb Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This commit is contained in:
parent
cefa4d4750
commit
05b6a33336
@ -7,7 +7,7 @@ and ``--config-dir``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class ConfigOpts(object):
|
||||
class ConfigOpts:
|
||||
|
||||
def __call__(self, ...):
|
||||
|
||||
|
@ -81,7 +81,7 @@ the option is referenced:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class ExtensionManager(object):
|
||||
class ExtensionManager:
|
||||
|
||||
enabled_apis_opt = cfg.ListOpt(...)
|
||||
|
||||
|
@ -424,7 +424,7 @@ def _report_deprecation(format_str, format_dict):
|
||||
|
||||
|
||||
@functools.total_ordering
|
||||
class Opt(object):
|
||||
class Opt:
|
||||
|
||||
"""Base class for all configuration options.
|
||||
|
||||
@ -809,7 +809,7 @@ class Opt(object):
|
||||
return hash(self) < hash(another)
|
||||
|
||||
|
||||
class DeprecatedOpt(object):
|
||||
class DeprecatedOpt:
|
||||
|
||||
"""Represents a Deprecated option.
|
||||
|
||||
@ -1416,7 +1416,7 @@ class _ConfigDirOpt(Opt):
|
||||
return kwargs
|
||||
|
||||
|
||||
class OptGroup(object):
|
||||
class OptGroup:
|
||||
|
||||
"""Represents a group of opts.
|
||||
|
||||
@ -3155,7 +3155,7 @@ class ConfigOpts(abc.Mapping):
|
||||
"""Return the number of options and option groups."""
|
||||
return len(self._group._opts)
|
||||
|
||||
class SubCommandAttr(object):
|
||||
class SubCommandAttr:
|
||||
|
||||
"""Helper class.
|
||||
|
||||
@ -3189,7 +3189,7 @@ class ConfigOpts(abc.Mapping):
|
||||
except AttributeError:
|
||||
raise NoSuchOptError(name)
|
||||
|
||||
class StrSubWrapper(object):
|
||||
class StrSubWrapper:
|
||||
|
||||
"""Helper class.
|
||||
|
||||
|
@ -174,7 +174,7 @@ def _format_type_name(opt_type):
|
||||
return 'unknown value'
|
||||
|
||||
|
||||
class _OptFormatter(object):
|
||||
class _OptFormatter:
|
||||
|
||||
"""Format configuration option descriptions to a file."""
|
||||
|
||||
|
@ -23,7 +23,7 @@ class ParseError(Exception):
|
||||
return 'at line %d, %s: %r' % (self.lineno, self.msg, self.line)
|
||||
|
||||
|
||||
class BaseParser(object):
|
||||
class BaseParser:
|
||||
lineno = 0
|
||||
parse_exc = ParseError
|
||||
|
||||
|
@ -33,10 +33,10 @@ import abc
|
||||
_NoValue = object()
|
||||
|
||||
|
||||
class ConfigurationSourceDriver(object, metaclass=abc.ABCMeta):
|
||||
class ConfigurationSourceDriver(metaclass=abc.ABCMeta):
|
||||
"""A backend driver option for oslo.config.
|
||||
|
||||
For each group name listed in **config_source** on the **DEFAULT** group,
|
||||
For each group name listed in **config_source** in the **DEFAULT** group,
|
||||
a :class:`ConfigurationSourceDriver` is responsible for creating one new
|
||||
instance of a :class:`ConfigurationSource`. The proper driver class to be
|
||||
used is selected based on the **driver** option inside each one of the
|
||||
@ -96,7 +96,7 @@ class ConfigurationSourceDriver(object, metaclass=abc.ABCMeta):
|
||||
"""
|
||||
|
||||
|
||||
class ConfigurationSource(object, metaclass=abc.ABCMeta):
|
||||
class ConfigurationSource(metaclass=abc.ABCMeta):
|
||||
"""A configuration source option for oslo.config.
|
||||
|
||||
A configuration source is able to fetch configuration values based on
|
||||
|
@ -3958,7 +3958,7 @@ class FindFileTestCase(BaseTestCase):
|
||||
|
||||
class OptDumpingTestCase(BaseTestCase):
|
||||
|
||||
class FakeLogger(object):
|
||||
class FakeLogger:
|
||||
|
||||
def __init__(self, test_case, expected_lvl):
|
||||
self.test_case = test_case
|
||||
|
@ -1638,7 +1638,7 @@ class GeneratorRaiseErrorTestCase(base.BaseTestCase):
|
||||
class FakeException(Exception):
|
||||
pass
|
||||
|
||||
class FakeEP(object):
|
||||
class FakeEP:
|
||||
|
||||
def __init__(self):
|
||||
self.name = 'callback_is_expected'
|
||||
|
@ -37,7 +37,7 @@ class ConfigTypeTests(unittest.TestCase):
|
||||
MyString()
|
||||
|
||||
|
||||
class TypeTestHelper(object):
|
||||
class TypeTestHelper:
|
||||
def setUp(self):
|
||||
super(TypeTestHelper, self).setUp()
|
||||
self.type_instance = self.type
|
||||
|
@ -30,7 +30,7 @@ import netaddr
|
||||
import rfc3986
|
||||
|
||||
|
||||
class ConfigType(object, metaclass=abc.ABCMeta):
|
||||
class ConfigType(metaclass=abc.ABCMeta):
|
||||
|
||||
def __init__(self, type_name='unknown type'):
|
||||
self.type_name = type_name
|
||||
|
Loading…
Reference in New Issue
Block a user