diff options
Diffstat (limited to 'oslo_config')
-rw-r--r-- | oslo_config/cfg.py | 10 | ||||
-rw-r--r-- | oslo_config/generator.py | 2 | ||||
-rw-r--r-- | oslo_config/iniparser.py | 2 | ||||
-rw-r--r-- | oslo_config/sources/__init__.py | 6 | ||||
-rw-r--r-- | oslo_config/tests/test_cfg.py | 2 | ||||
-rw-r--r-- | oslo_config/tests/test_generator.py | 2 | ||||
-rw-r--r-- | oslo_config/tests/test_types.py | 2 | ||||
-rw-r--r-- | oslo_config/types.py | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py index 5324e52..39a9878 100644 --- a/oslo_config/cfg.py +++ b/oslo_config/cfg.py @@ -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. diff --git a/oslo_config/generator.py b/oslo_config/generator.py index 277036b..9fdde09 100644 --- a/oslo_config/generator.py +++ b/oslo_config/generator.py @@ -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.""" diff --git a/oslo_config/iniparser.py b/oslo_config/iniparser.py index 90218e4..b79ee08 100644 --- a/oslo_config/iniparser.py +++ b/oslo_config/iniparser.py @@ -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 diff --git a/oslo_config/sources/__init__.py b/oslo_config/sources/__init__.py index 92b557d..a1fa0c5 100644 --- a/oslo_config/sources/__init__.py +++ b/oslo_config/sources/__init__.py @@ -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 diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py index ac45780..505cb00 100644 --- a/oslo_config/tests/test_cfg.py +++ b/oslo_config/tests/test_cfg.py @@ -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 diff --git a/oslo_config/tests/test_generator.py b/oslo_config/tests/test_generator.py index 9a27aac..d75b4d8 100644 --- a/oslo_config/tests/test_generator.py +++ b/oslo_config/tests/test_generator.py @@ -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' diff --git a/oslo_config/tests/test_types.py b/oslo_config/tests/test_types.py index 8ab4a09..dd56b98 100644 --- a/oslo_config/tests/test_types.py +++ b/oslo_config/tests/test_types.py @@ -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 diff --git a/oslo_config/types.py b/oslo_config/types.py index a1f75c9..72242cb 100644 --- a/oslo_config/types.py +++ b/oslo_config/types.py @@ -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 |