[v1,2/4] dts: unify class inheritance from object
Checks
Commit Message
There are two ways we specify that a class inherits from object -
implicitly and explicitly. There's no need to explicitly specify that a
class inherits from object and is in fact mostly a remnant from Python2.
Leaving it implicit is the standard in Python3 and offers a small bonus
in cases where something would assign something else to the builtin
object variable.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
dts/framework/remote_session/testpmd_shell.py | 2 +-
dts/framework/test_result.py | 4 ++--
dts/framework/test_suite.py | 2 +-
dts/framework/testbed_model/cpu.py | 4 ++--
dts/framework/testbed_model/sut_node.py | 2 +-
dts/framework/testbed_model/virtual_device.py | 2 +-
dts/framework/utils.py | 4 ++--
7 files changed, 10 insertions(+), 10 deletions(-)
Comments
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Patrick Robb <probb@iol.unh.edu>
Reviewed-by: Jeremy Spewock <jspewock@iol.unh.edu>
@@ -27,7 +27,7 @@
from .interactive_shell import InteractiveShell
-class TestPmdDevice(object):
+class TestPmdDevice:
"""The data of a device that testpmd can recognize.
Attributes:
@@ -96,7 +96,7 @@ def __bool__(self) -> bool:
return self is self.PASS
-class FixtureResult(object):
+class FixtureResult:
"""A record that stores the result of a setup or a teardown.
:attr:`~Result.FAIL` is a sensible default since it prevents false positives (which could happen
@@ -132,7 +132,7 @@ def __bool__(self) -> bool:
return bool(self.result)
-class BaseResult(object):
+class BaseResult:
"""Common data and behavior of DTS results.
Stores the results of the setup and teardown portions of the corresponding stage.
@@ -27,7 +27,7 @@
from .utils import get_packet_summaries
-class TestSuite(object):
+class TestSuite:
"""The base class with building blocks needed by most test cases.
* Test suite setup/cleanup methods to override,
@@ -26,7 +26,7 @@
@dataclass(slots=True, frozen=True)
-class LogicalCore(object):
+class LogicalCore:
"""Representation of a logical CPU core.
A physical core is represented in OS by multiple logical cores (lcores)
@@ -50,7 +50,7 @@ def __int__(self) -> int:
return self.lcore
-class LogicalCoreList(object):
+class LogicalCoreList:
r"""A unified way to store :class:`LogicalCore`\s.
Create a unified format used across the framework and allow the user to use
@@ -34,7 +34,7 @@
from .virtual_device import VirtualDevice
-class EalParameters(object):
+class EalParameters:
"""The environment abstraction layer parameters.
The string representation can be created by converting the instance to a string.
@@ -7,7 +7,7 @@
"""
-class VirtualDevice(object):
+class VirtualDevice:
"""Base class for virtual devices used by DPDK.
Attributes:
@@ -82,7 +82,7 @@ def __str__(self) -> str:
return self.name
-class MesonArgs(object):
+class MesonArgs:
"""Aggregate the arguments needed to build DPDK."""
_default_library: str
@@ -131,7 +131,7 @@ class _TarCompressionFormat(StrEnum):
zstd = "zst"
-class DPDKGitTarball(object):
+class DPDKGitTarball:
"""Compressed tarball of DPDK from the repository.
The class supports the :class:`os.PathLike` protocol,