Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp885166rdb; Wed, 6 Dec 2023 02:48:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVi8SchLRAoTiuTuOZ5gLb7DQ+gZeQbpEodb2/iInbBvHSaCOrKsLTIi6RrpbMRpnJPVQv X-Received: by 2002:a17:90a:8c2:b0:286:c37f:d1b1 with SMTP id 2-20020a17090a08c200b00286c37fd1b1mr688256pjn.41.1701859692815; Wed, 06 Dec 2023 02:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701859692; cv=none; d=google.com; s=arc-20160816; b=LYP6Ll6vmui2GOVE0hEPgYaU8YeV32gIbCs6VTtp4yb5QmcUuJCmQjzf0ClkXomo4g KB3Xq354u38SLCvLDEivTVwniwZh44IZifbVCW6d2SLMwKy/WvGrCnLzAbuFhP7a5mhg 3QXgsvIsdUAW4h2fZARlWe7o4O3J9r8z62aKiacqpBStQfc6P3mb8nQpb3ciPzs4FVJN tAmUkFPPwS37lwSa9NYRaECpxgmbSfAXZCwXQFXNCUbUNKTxmKkPJHtVWATk82bB0uZO /kGxvfGMGMs2NcoK3ic1NSgdB8gHK5/0xP56z5wJ4sbBs8ajKgAj1aBf0uwnG7p3swnE 4k1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=XFAK3Qzk03nDtVoo+52ZWauNOzQSvZWpOly5HybmSFM=; fh=M/4CRKlsQR53kOvbvsHfGDOrpcvBUt/h3Rh4tB3zkdA=; b=qye6JhGb5iyIfDEqGsQSdfBtmOJnMOevgqbEjxFr+EcvEL1OmVEdyxWk/xO1AOGF1Q EzZ9kAEAnul2yIyDUQ3k48Q+BKrBBnv4Ptbrb16eVGx+BSfmTSfvwW7lSy6GaXBbV4JY R7kzerUXhtX7p2ZGqTekQwP2VL6/IzRZmUe3ulCAH++4KYybfXVS0XnGlqqUaLrvWQpH 1kuBLm5NXzR+8rsTvV61mT5oIbnvSPqS85b576iJDu8MEHE5NzL7T8yGM/YOrodFbVHu bFE/cMcCqgtKJxAlLueMMzyQFpOfNTOQastrtGdo9iTnQfmZqKZooOFE9Pc2r3V1PWp7 SRsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O4lUvbTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ot13-20020a17090b3b4d00b002839e1cb23csi14133609pjb.117.2023.12.06.02.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 02:48:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O4lUvbTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 321A282EC565; Wed, 6 Dec 2023 02:48:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377808AbjLFKrj (ORCPT + 99 others); Wed, 6 Dec 2023 05:47:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377770AbjLFKrD (ORCPT ); Wed, 6 Dec 2023 05:47:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187781BE4 for ; Wed, 6 Dec 2023 02:46:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0018CC43391; Wed, 6 Dec 2023 10:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701859597; bh=brjJ96URjS/De2F/QMe4Vwb6nXSvrFhFcqR+W+FmdYU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=O4lUvbTgHVGmEJWPwZ5TfYMQuF+8+bjlb0IDYH2Dmj0E8ZMhJHuYMK+ouzUobW29t o7sidpF+vyC4nDWy5QwxcxOmmoY97SMaYS6ZktBOTgUXFE+DKl6Dk4XB2NknRYP2Vf xpLrLkD7+qvB0zjb4yqol0yRyy+7h/nHM22TdqXLAo5Fw9ZbigDjcflmRMa7aCvett +6cvgXqcWP2z5N+0HWfEtcw7HJyetqM9iFFRQkFmRu6aaNhqTfuCJmpFUXl9b/FmzB nRcAQqxGoKTFo6jBOS3BBzPIeO6OpJ0eqF4HiDRIYedg58s7T3v2N6JxoFvRl7r4Tz zgd5UifDqDEaA== From: Benjamin Tissoires Date: Wed, 06 Dec 2023 11:46:06 +0100 Subject: [PATCH v2 15/15] selftests/hid: fix ruff linter complains MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231206-wip-selftests-v2-15-c0350c2f5986@kernel.org> References: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> In-Reply-To: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Hutterer Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701859565; l=2505; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=brjJ96URjS/De2F/QMe4Vwb6nXSvrFhFcqR+W+FmdYU=; b=tdJcMhy7Ay4dczYmS/vEywZYeugyRtvPySkGrsTjVqjJfg1eQ7HmsabSTrrYmeotZMcpy+eco ZNIAuLH/1gUDWZva7HhwohRisMlNN6WYKaYM+Xn2CRPdapO3zgpXec3 X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 02:48:09 -0800 (PST) rename ambiguous variables l, r, and m, and ignore the return values of uhdev.get_evdev() and uhdev.get_slot() Signed-off-by: Benjamin Tissoires --- new in v2 --- tools/testing/selftests/hid/tests/test_mouse.py | 14 +++++++------- tools/testing/selftests/hid/tests/test_wacom_generic.py | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/hid/tests/test_mouse.py b/tools/testing/selftests/hid/tests/test_mouse.py index fd2ba62e783a..66daf7e5975c 100644 --- a/tools/testing/selftests/hid/tests/test_mouse.py +++ b/tools/testing/selftests/hid/tests/test_mouse.py @@ -52,13 +52,13 @@ class BaseMouse(base.UHIDTestDevice): :param reportID: the numeric report ID for this report, if needed """ if buttons is not None: - l, r, m = buttons - if l is not None: - self.left = l - if r is not None: - self.right = r - if m is not None: - self.middle = m + left, right, middle = buttons + if left is not None: + self.left = left + if right is not None: + self.right = right + if middle is not None: + self.middle = middle left = self.left right = self.right middle = self.middle diff --git a/tools/testing/selftests/hid/tests/test_wacom_generic.py b/tools/testing/selftests/hid/tests/test_wacom_generic.py index f92fe8e02c1b..49186a27467e 100644 --- a/tools/testing/selftests/hid/tests/test_wacom_generic.py +++ b/tools/testing/selftests/hid/tests/test_wacom_generic.py @@ -909,7 +909,7 @@ class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest Ensure that the confidence bit being set to false should not result in a touch event. """ uhdev = self.uhdev - evdev = uhdev.get_evdev() + _evdev = uhdev.get_evdev() t0 = test_multitouch.Touch(1, 50, 100) t0.confidence = False @@ -917,6 +917,6 @@ class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest events = uhdev.next_sync_events() self.debug_reports(r, uhdev, events) - slot = self.get_slot(uhdev, t0, 0) + _slot = self.get_slot(uhdev, t0, 0) - assert not events \ No newline at end of file + assert not events -- 2.41.0