From patchwork Tue Mar 19 17:33:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 87375 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFCF6385841E for ; Tue, 19 Mar 2024 17:35:27 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by sourceware.org (Postfix) with ESMTPS id 79FEB3858402 for ; Tue, 19 Mar 2024 17:33:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79FEB3858402 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 79FEB3858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710869633; cv=none; b=Z++DQda17qpx6OwvIVz8lZ5PTsFT+5qf2VZCBbTbCAWJX+Bag0kXf4FOwg3loiOY4xIfsmbcg5jCTOw1arqYMNw2mLOOtpxlAY3PS0WC6wSbJe/zkDnRlqoavL0VXaqas9hfL265r/Z3JU+qIDGX20blnsDGsyOG5KTjhZn6MCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710869633; c=relaxed/simple; bh=dizY3w6LZ0zYQxzndOtMPIhcfVLEOVS3fqUxtMs6rUI=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=LJT4rXVUii9EtIZ45hvXhyfj6mfMWrIcSerV8Z4twMjoSdKTm3xZZLFsMiFJl3XV9CLe4zvt+/dX1e7CIqB+KVp9omz5fE/zNTOTwKHcdYkRfTDtYcjkLkWnjreZBGzpdd51Z2sIVGbPStILNpcsO9W0dQyglnXJ7HY0+IkZNxQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7c7f3f66d17so137678839f.0 for ; Tue, 19 Mar 2024 10:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1710869612; x=1711474412; 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=WjpP6KMLd+9hmkTXbL15Pbnc0WBU2awpkZajeFnjeDU=; b=cwmo2/9Dz20TejUn2AJFQw/20yPA6fJDiTIA0ubJw190ABrWXzn5QdFhUGaVxgS9bR Yt2XRVwX7C+B4oprAbhn/xdwJ8gs1lmuhuvHj396vPqWxfg3yuQ49lZGavfAU6rar8OT TMTei6CV2q8Xok+Y2vwyuoeVSytG4jJNnS0mWjjHOuT4i5DcG8ZtmmNrmMeGStMr6lTF 7ZiHawdJcrNXwb4sPiQkTA8Yd8Y+VP8W0jDVWtZRwB14ZgLHIXmKOiMEDb7IPXqCvtuC u5wVVaI8kFl9r5pDX0ldbunHK41GMbk/H9VJSlOFJGIILRu8s7Njio30mDS5QpNyRNyh u1+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710869612; x=1711474412; 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=WjpP6KMLd+9hmkTXbL15Pbnc0WBU2awpkZajeFnjeDU=; b=qewcPCaiJSHKYs8vB5bHD/tX162Gouhcr4UEYzAU+ILlgK9lPCJxeURwkA2EV8/RYf KGDaCDj9AZm+wP1OJQyyrS4RpA7WH14twIS8JV70rFLVP6GjImb5oadDF16D10YMcvW5 YXt00AECIx3rYSsBc6uPWanUAD5bZpD22bqAtvbDFnLPHruUo2NALwlQLE/C/CF3Rb5O dy+4Ou8p3eDnDxAZ2K6cdyZO1up/C/+bbGbnGmN7rZ4jTHQ5PzfSLU99glLo+KKtJsAq xVBXqssSytHJp21b5VCpF3QVGGNn6K6d4oTqFk+aJYtP4Z+g24iDlkdG1U+Odc4MBxS7 Y/UQ== X-Gm-Message-State: AOJu0YwDQHsz8Dx6w0YrIBpPbzG0q09SKVXDnx6EbL40Zq1kLL6OF8X9 wQCl3U0q7btGrJCRTVTiV/T/tle+89ooZZeAwwYsErL+wsP6YrdGJIncEigKEJpJreNiVRK6hso = X-Google-Smtp-Source: AGHT+IHJRTkii81C8nrx/6wysYSp7PxA+77AJiBb0chL5X7x+0ORnYqi7R7D3iBXJ+5sH5PtV0pfcQ== X-Received: by 2002:a05:6602:120c:b0:7ce:cddc:d9b0 with SMTP id y12-20020a056602120c00b007cecddcd9b0mr3513206iot.15.1710869612674; Tue, 19 Mar 2024 10:33:32 -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.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:33:32 -0700 (PDT) From: Tom Tromey Date: Tue, 19 Mar 2024 11:33:34 -0600 Subject: [PATCH 6/9] Suppress star import errors MIME-Version: 1.0 Message-Id: <20240319-more-flake8-v1-6-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.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org flake8 warns about the "from _gdb.disassembler import *" line in disassembler.py, and a similar line from __init__.py. These line are needed to re-export names from the corresponding C++ module, so this patch applies the appropriate "noqa" flags. --- gdb/python/lib/gdb/__init__.py | 3 ++- gdb/python/lib/gdb/disassembler.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py index 9f0f6dc1e5d..2ff1f95c8fd 100644 --- a/gdb/python/lib/gdb/__init__.py +++ b/gdb/python/lib/gdb/__init__.py @@ -26,7 +26,8 @@ if sys.version_info >= (3, 4): else: from imp import reload -from _gdb import * +# Note that two indicators are needed here to silence flake8. +from _gdb import * # noqa: F401,F403 # Historically, gdb.events was always available, so ensure it's # still available without an explicit import. diff --git a/gdb/python/lib/gdb/disassembler.py b/gdb/python/lib/gdb/disassembler.py index 2d313ae2122..af7dcc5f6a8 100644 --- a/gdb/python/lib/gdb/disassembler.py +++ b/gdb/python/lib/gdb/disassembler.py @@ -19,8 +19,9 @@ import gdb import _gdb.disassembler # Re-export everything from the _gdb.disassembler module, which is -# defined within GDB's C++ code. -from _gdb.disassembler import * +# defined within GDB's C++ code. Note that two indicators are needed +# here to silence flake8. +from _gdb.disassembler import * # noqa: F401,F403 # Module global dictionary of gdb.disassembler.Disassembler objects. # The keys of this dictionary are bfd architecture names, or the