summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoisés Guimarães de Medeiros <moguimar@redhat.com>2020-12-01 12:36:32 +0100
committerMoisés Guimarães de Medeiros <moguimar@redhat.com>2021-01-12 17:09:25 +0000
commit05b6a3333603595ef99131286b8ccbf1e48136f7 (patch)
tree45cb277357a834ef494b7606ed89e49d2494cc23
parentcefa4d47507acfd7a90f6a56b73b4795ba881a52 (diff)
downloadoslo-config-05b6a3333603595ef99131286b8ccbf1e48136f7.tar.gz
inherit from object is not required for py3
Change-Id: I3f3b1dca78e2e9b2515231ccc6600b64f31039fb Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
-rw-r--r--doc/source/reference/configuration-files.rst2
-rw-r--r--doc/source/reference/defining.rst2
-rw-r--r--oslo_config/cfg.py10
-rw-r--r--oslo_config/generator.py2
-rw-r--r--oslo_config/iniparser.py2
-rw-r--r--oslo_config/sources/__init__.py6
-rw-r--r--oslo_config/tests/test_cfg.py2
-rw-r--r--oslo_config/tests/test_generator.py2
-rw-r--r--oslo_config/tests/test_types.py2
-rw-r--r--oslo_config/types.py2
10 files changed, 16 insertions, 16 deletions
diff --git a/doc/source/reference/configuration-files.rst b/doc/source/reference/configuration-files.rst
index b4e299d..435a135 100644
--- a/doc/source/reference/configuration-files.rst
+++ b/doc/source/reference/configuration-files.rst
@@ -7,7 +7,7 @@ and ``--config-dir``:
.. code-block:: python
- class ConfigOpts(object):
+ class ConfigOpts:
def __call__(self, ...):
diff --git a/doc/source/reference/defining.rst b/doc/source/reference/defining.rst
index d8e1866..19a70ec 100644
--- a/doc/source/reference/defining.rst
+++ b/doc/source/reference/defining.rst
@@ -81,7 +81,7 @@ the option is referenced:
.. code-block:: python
- class ExtensionManager(object):
+ class ExtensionManager:
enabled_apis_opt = cfg.ListOpt(...)
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