From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D86BC454A8; Wed, 19 Jun 2024 15:37:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC3AC427C0; Wed, 19 Jun 2024 15:37:12 +0200 (CEST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mails.dpdk.org (Postfix) with ESMTP id 4917A4021D for ; Wed, 19 Jun 2024 15:35:33 +0200 (CEST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-57d05e0017aso1634877a12.1 for ; Wed, 19 Jun 2024 06:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1718804133; x=1719408933; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qFu2ejPOUUGeiY4Uj+kKcKxtjG3UnV2OPdHHGTIM+oQ=; b=YPhB8/5QBpCrtXJNvzPGR/VtT2ui0JKlTMz7uvARB4tUE7LsGsyxPxmwIDyGXh7ie7 vLLi9AUR27bwJjLeBd9UwHByKDPS4mMMGLikB3CYy14ij9U2vTiJfmjUfKZI3mH38XMz 1qOhFkb3e6+mSBq2hMOAnMFNTUXgYuxP0lpM5YPExWHgikJKaEpsFhWky1YVuwyidHOB CwjvzQOHyI3gB/S014rRIjG74G8YzvkYvv4hDTVDC9Bi0pCANpYINfFtaAhFkPVlOWD3 j5KKSgzS5xT8LZjYxR9zlS7V9ELxdeQ6Nn1os7FJLXBC6tDGYi70H9HhQ9X84AlEf6Tb X2ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718804133; x=1719408933; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qFu2ejPOUUGeiY4Uj+kKcKxtjG3UnV2OPdHHGTIM+oQ=; b=s4WeBWJCKJm/1wjRlb9D5GLzWrwNM20I83urpwbOssgnzjUQ/mdbArdGi0KGHa6+aI h6PwLiAc517g0norl6sEMTPJq6ZJW3Z7J89q8rxGqYbXivJjQE2tm/4eSEIUp9Zd10Hk ++TgRyYQPdHeSX/sFv+CoNhkuGNyVcXg3lZuWcTZYxok/OBCGv/hhGPIQz6p78nwd2Fj 8HfefqVUZJ9LWLtx41CNVPsULtUkHJpq9G07E23j2LzAnxzD5jsTF1QvChzzA/3O65yU 918AMSLJwFk4ahnKMB2xZuGu+tXnu6KKKrkd4kBoyaav+v2oGX0oOCPAHSz4yUf3ibXo b2WA== X-Gm-Message-State: AOJu0Ywgpju0NZ38hyzdKrcvhbp9AxuIGVHTg4Ca3X85L0E48kghFZRI QWGbcPITZEPz5a5vMJ9Xi9RuZveIEYvtL4eK/Tc7cgynZGc7SafBUdpCc/kLMu0= X-Google-Smtp-Source: AGHT+IFPmBp18xWMhP7v+p3aq5pk/IOU31gwSFe8/BMkdTPgN/6jTcrd5qT50lKjcbA58G0RJ8CfCg== X-Received: by 2002:a17:907:874e:b0:a6f:1e06:29e4 with SMTP id a640c23a62f3a-a6fab77a25emr180167866b.57.1718804132825; Wed, 19 Jun 2024 06:35:32 -0700 (PDT) Received: from localhost.localdomain ([84.245.121.236]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da3fe5sm676723566b.18.2024.06.19.06.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 06:35:32 -0700 (PDT) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= , Luca Vizzarro Subject: [PATCH v2 3/5] dts: unify super calls Date: Wed, 19 Jun 2024 15:35:24 +0200 Message-Id: <20240619133526.28614-4-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619133526.28614-1-juraj.linkes@pantheon.tech> References: <20240423091252.62924-1-juraj.linkes@pantheon.tech> <20240619133526.28614-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org We have two ways of calling super() in the codebase. For single inheritance, there's no benefit in listing the arguments, as the function will do exactly what we need it to do. Signed-off-by: Juraj Linkeš Reviewed-by: Luca Vizzarro Reviewed-by: Patrick Robb Reviewed-by: Jeremy Spewock --- dts/framework/test_result.py | 12 ++++++------ dts/framework/testbed_model/sut_node.py | 2 +- dts/framework/testbed_model/tg_node.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dts/framework/test_result.py b/dts/framework/test_result.py index 5deccb6fd4..5694a2482b 100644 --- a/dts/framework/test_result.py +++ b/dts/framework/test_result.py @@ -249,7 +249,7 @@ def __init__(self, logger: DTSLogger): Args: logger: The logger instance the whole result will use. """ - super(DTSResult, self).__init__() + super().__init__() self.dpdk_version = None self._logger = logger self._errors = [] @@ -338,7 +338,7 @@ def __init__(self, test_run_config: TestRunConfiguration): Args: test_run_config: A test run configuration. """ - super(TestRunResult, self).__init__() + super().__init__() self._config = test_run_config self._test_suites_with_cases = [] @@ -432,7 +432,7 @@ def __init__( test_suites_with_cases: The test suites with test cases to be run in this build target. build_target_config: The build target's test run configuration. """ - super(BuildTargetResult, self).__init__() + super().__init__() self.arch = build_target_config.arch self.os = build_target_config.os self.cpu = build_target_config.cpu @@ -493,7 +493,7 @@ def __init__(self, test_suite_with_cases: TestSuiteWithCases): Args: test_suite_with_cases: The test suite with test cases. """ - super(TestSuiteResult, self).__init__() + super().__init__() self.test_suite_name = test_suite_with_cases.test_suite_class.__name__ self._test_suite_with_cases = test_suite_with_cases @@ -536,7 +536,7 @@ def __init__(self, test_case_name: str): Args: test_case_name: The test case's name. """ - super(TestCaseResult, self).__init__() + super().__init__() self.test_case_name = test_case_name def update(self, result: Result, error: Exception | None = None) -> None: @@ -594,7 +594,7 @@ def __init__(self, dpdk_version: str | None): Args: dpdk_version: The version of tested DPDK. """ - super(Statistics, self).__init__() + super().__init__() for result in Result: self[result.name] = 0 self["PASS RATE"] = 0.0 diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py index 10d56eba8d..800fbef860 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -130,7 +130,7 @@ def __init__(self, node_config: SutNodeConfiguration): Args: node_config: The SUT node's test run configuration. """ - super(SutNode, self).__init__(node_config) + super().__init__(node_config) self._dpdk_prefix_list = [] self._build_target_config = None self._env_vars = {} diff --git a/dts/framework/testbed_model/tg_node.py b/dts/framework/testbed_model/tg_node.py index 164f790383..9dae56ed9c 100644 --- a/dts/framework/testbed_model/tg_node.py +++ b/dts/framework/testbed_model/tg_node.py @@ -48,7 +48,7 @@ def __init__(self, node_config: TGNodeConfiguration): Args: node_config: The TG node's test run configuration. """ - super(TGNode, self).__init__(node_config) + super().__init__(node_config) self.traffic_generator = create_traffic_generator(self, node_config.traffic_generator) self._logger.info(f"Created node: {self.name}") @@ -90,4 +90,4 @@ def close(self) -> None: This extends the superclass method with TG cleanup. """ self.traffic_generator.close() - super(TGNode, self).close() + super().close() -- 2.34.1