From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id 4C21E3858C98 for ; Tue, 19 Mar 2024 17:33:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C21E3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4C21E3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710869615; cv=none; b=HbEGjaKTCLcNZ6e/T0ubXKJm4bl15iiWaLAj+jVt6oF+kpvg2YUSVlWOb0m7xRsA298/mOHnQSFSo7fLj+/W/yly43YrQEYbOb/O6ifWVjctCs4ZxsGzWuXoQq7LZWQfyHaPc75wZXfX8lsmnXxDF1P22hT7Vf4Bj4FS35RxFtM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710869615; c=relaxed/simple; bh=5y9TOPoAGEC/32y2BOH7S6YiwSZ4eCSUYa5fy1ylu4A=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=PdnA22kANjW/wfDU+9Zzp2yqejuksYOnDMVrBI5cszK0FYSOqXkTH9SkwrcFVGHA/YM9m+5KBBWF4d0fMHlN2S+Fk1lr1BX+iu7KIC8KHjDKNAuevVLENAeou8M92SZpYmHmi2Sicnb5yEMIFy4u2iPBR0PNMr0PUsquLcsvhUk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7cd06b9682aso58444239f.3 for ; Tue, 19 Mar 2024 10:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1710869611; x=1711474411; darn=sourceware.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nsUu3LSMWgEZWdPvQKGsjgfIPee3RpKUEH6YNRcbm0U=; b=KYLIOqhgXPBXzVczUkAJGz6auXzkYyrhIV74H5K41qw0ltes1FF5wkbD8C6I7QG2Ad +Msb4t4AliOn8ABvIiMm31RkGS6JH/wDs/mhWna2CtzSBKQIiIvO8tm497t1iTBjTpHd 0PnsLA9HVIo1esuOba6u+jJaV7M9NwGTMZjTh/hsPoBAeR4ZosoqCHMFWpd0agfldHcu +LqvBtYLtB/63IB2WhTHDTYMYZZRsW57PW0z5V0Q0eZ+d99YbLoMkiRS1qvCJ+vWjGhc F2+qa0P2wPnxPRvjmrdjpe7HsdrpX0tnajWw94Yg7nJnzMtHxXojBudPW3iSqcZZQAa3 +hvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710869611; x=1711474411; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nsUu3LSMWgEZWdPvQKGsjgfIPee3RpKUEH6YNRcbm0U=; b=WVt3bBymp30/2WK9YnYkvDFD3X2fMOQz1nD6iqOZuQUbQFuZOpSSU6FQksz/q3yRr+ +dvZCJXjb4NtO87k/Bn7Nry1waX7lopT0utYTfcm6RjIo206S9gm3QeovHwPlKxPrgLI FXlusL2nJ5wqSUNs+IHCpeJlkHShJp3t2F8YpW+V9SNhTJp0beA7BA/WqfYtVBdDvx7P OerVZrjvOsoTw51hHP2hbHq414MSedRwUO/ZzJX+9nLRpXoDjWfCpErOMA1YRRuyJ25G 20Zp3t0dj0fjisIXS/yQUq7yvuGopz5uOWpWCV7l+SddCzx+LGDA+jOCKhctiINwJAYy W2xw== X-Gm-Message-State: AOJu0YzIhclRiibH4CGsFB+EU0T4XQxigHdp34S1vu+nd/UYk5DuEPKX flS11aaRi5Q5VSevXi4QqG+1Ls5tl5oH9RifBzCNjNEYZmvKXCBUx4YGXBLEeMSuq4uXeUNEkfo = X-Google-Smtp-Source: AGHT+IHM2ybegrJIQUJngKcaVdKu9PJ3ZMWHgLv9kj51cT02RTHpUaGP1b3sRovECGlxJUPqRp8JDA== X-Received: by 2002:a5d:9158:0:b0:7cf:c28:568b with SMTP id y24-20020a5d9158000000b007cf0c28568bmr1654595ioq.7.1710869611507; Tue, 19 Mar 2024 10:33:31 -0700 (PDT) Received: from localhost.localdomain (97-122-82-115.hlrn.qwest.net. [97.122.82.115]) by smtp.gmail.com with ESMTPSA id z14-20020a6b650e000000b007cbf1b72c64sm2561310iob.26.2024.03.19.10.33.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:33:31 -0700 (PDT) From: Tom Tromey Date: Tue, 19 Mar 2024 11:33:31 -0600 Subject: [PATCH 3/9] Ignore unsed import in dap/__init__.py MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240319-more-flake8-v1-3-893549dbed75@adacore.com> References: <20240319-more-flake8-v1-0-893549dbed75@adacore.com> In-Reply-To: <20240319-more-flake8-v1-0-893549dbed75@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: flake8 warns about dap/__init__.py because it has a number of unused imports. Most of these are intentional: the import is done to ensure that the a DAP request is registered with the server object. This patch applies a "noqa" comment to these imports, and also removes one import that is truly unnecessary. --- gdb/python/lib/gdb/dap/__init__.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/gdb/python/lib/gdb/dap/__init__.py b/gdb/python/lib/gdb/dap/__init__.py index 86da9b8ef3c..f947314880c 100644 --- a/gdb/python/lib/gdb/dap/__init__.py +++ b/gdb/python/lib/gdb/dap/__init__.py @@ -14,25 +14,27 @@ # along with this program. If not, see . import os -import gdb # This must come before other DAP imports. from . import startup -# Load modules that define commands. -from . import breakpoint -from . import bt -from . import disassemble -from . import evaluate -from . import launch -from . import locations -from . import memory -from . import modules -from . import next -from . import pause -from . import scopes -from . import sources -from . import threads +# Load modules that define commands. These imports intentionally +# ignore the unused import warning, as these modules are being loaded +# for their side effects -- namely, registering DAP commands with the +# server object. "F401" is the flake8 "imported but unused" code. +from . import breakpoint # noqa: F401 +from . import bt # noqa: F401 +from . import disassemble # noqa: F401 +from . import evaluate # noqa: F401 +from . import launch # noqa: F401 +from . import locations # noqa: F401 +from . import memory # noqa: F401 +from . import modules # noqa: F401 +from . import next # noqa: F401 +from . import pause # noqa: F401 +from . import scopes # noqa: F401 +from . import sources # noqa: F401 +from . import threads # noqa: F401 from .server import Server -- 2.43.0