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 EC98F43EE8; Tue, 23 Apr 2024 11:13:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A391D40EE6; Tue, 23 Apr 2024 11:13:01 +0200 (CEST) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mails.dpdk.org (Postfix) with ESMTP id B1AAB40E96 for ; Tue, 23 Apr 2024 11:12:57 +0200 (CEST) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-572250b7704so153779a12.2 for ; Tue, 23 Apr 2024 02:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1713863577; x=1714468377; 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=zt+cpwojCFJbjCPuJwpMn36SqLh8GxwGPDpi4h0aSQg=; b=C5i3k2Rqqt9YdjtH5Yoc+s8dOl6dbWUQF9e/mP94hjYHzH2IwXwWL+uvb8usXO6ARz 1/ae7TfMNbTo2b7htlzhSZzmZpEp726UMarIMVOPnopo3jgJZkN4k8CTmhJba98HbGX/ GPTkXsaWKdnUyzUppZ2tXtJ+0H2Uzu1auBxqVQqU2zoiRqcAl60rcSnRi62ATp/gmupQ 4OJo/WivP34J6v/Jghu6hyC46u1PLyhMdCKAO/yhChIchMzvr7V8TtGgbeT4+Pyve/UY gw1qBLor+PitD4KpC6vDkOWb7LMdTEONgecwqvkp2z3raoGHMnlAo1tLZiB8XmcOudJW r72Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713863577; x=1714468377; 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=zt+cpwojCFJbjCPuJwpMn36SqLh8GxwGPDpi4h0aSQg=; b=Mrck1LEWM3bir4rw2jBaZAVU7ekeIWQ8tG31g5GPoDEn7s6DO3UZcLLZRTWbh1buSO 7raFHQpeTHxA5nL24dvaGGO4EkPKLdYU+qm9wrLey6mFIIm8qY9n78h19udao6oXSO2U q8eZnebQTmBTl2q75mkuAjvhcl4i5MzEEQAmKg//Qh+leqpVk8GpCLwMRoiSE35cu9EL vodlP3yaNJlRdUVsijf1478+qi4Ce9xoXFRoLdZshYWAq2xOamTKKTiNjqRaHBrIZxH2 ZoUKfrzhVLiIizSuHlYiPWjsBy7amPnNebQrtaLDxg+zFVCwwrRCY7eBLcNYondF7xsv e6zQ== X-Gm-Message-State: AOJu0YxdsCteTQHEnqZUejAkPnH9PaNW1Xcm3mkoPAt+OAm62DigHVCr wTAKo1DMFJHPW4i313X7yL5sEoSCJCIGfyY9cvBU/Ed0Q/R0EyW5iitM0bspAas= X-Google-Smtp-Source: AGHT+IFDKitDc2B00CyMppJsVm9veakKcNGHmsuZStEuLMFQS4O9WI/bD7u9jXKmCFqPMcLTF6uA0Q== X-Received: by 2002:a50:c31c:0:b0:56c:2ef7:f3e6 with SMTP id a28-20020a50c31c000000b0056c2ef7f3e6mr8794717edb.0.1713863577304; Tue, 23 Apr 2024 02:12:57 -0700 (PDT) Received: from jlinkes-PT-Latitude-5530.pantheon.local (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id be12-20020a0564021a2c00b0056bf7f92346sm6440534edb.50.2024.04.23.02.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 02:12:56 -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?= Subject: [PATCH v1 3/4] dts: unify super calls Date: Tue, 23 Apr 2024 11:12:51 +0200 Message-Id: <20240423091252.62924-4-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423091252.62924-1-juraj.linkes@pantheon.tech> References: <20240423091252.62924-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š --- 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 83e637c280..0163893adf 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, execution: ExecutionConfiguration): Args: execution: The execution's test run configuration. """ - super(ExecutionResult, self).__init__() + super().__init__() self._config = execution self._test_suites_with_cases = [] @@ -430,7 +430,7 @@ def __init__( test_suites_with_cases: The test suites with test cases to be run in this build target. build_target: The build target's test run configuration. """ - super(BuildTargetResult, self).__init__() + super().__init__() self.arch = build_target.arch self.os = build_target.os self.cpu = build_target.cpu @@ -491,7 +491,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 @@ -534,7 +534,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: @@ -592,7 +592,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 d3206e87e0..b0126e5e3d 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