From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id B5EEA3858CDB; Tue, 2 Apr 2024 17:09:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5EEA3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712077784; bh=Afyu9ydbfo3pAAnLVwwgT1fSgUAsVtCccaq84/gRPEo=; h=From:To:Subject:Date:From; b=x345jTTUrxup/9YVfZc31GeIug2nd9qKr580g7/Vh+CZJVc5vcctqUkP+VxCAfSXl TOZ3XlKbS2FJCvJu83j+enYNRqB0XSl64DINOfyc6qltKEfioDgjZQ7ktcPp6Gc5pt r3rL4PVDTMAVOxw5dxzrzhzrnpmwLMRGA8MyB3oU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Suppress star import errors X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 80c69af864ce523221ec9f439997849c91c7ba85 X-Git-Newrev: 788050bf18c05f9070cd4240c6ae90c6dee0f030 Message-Id: <20240402170944.B5EEA3858CDB@sourceware.org> Date: Tue, 2 Apr 2024 17:09:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D788050bf18c0= 5f9070cd4240c6ae90c6dee0f030 commit 788050bf18c05f9070cd4240c6ae90c6dee0f030 Author: Tom Tromey Date: Tue Mar 19 10:55:30 2024 -0600 Suppress star import errors =20 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. =20 Approved-By: Simon Marchi Diff: --- 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 >=3D (3, 4): else: from imp import reload =20 -from _gdb import * +# Note that two indicators are needed here to silence flake8. +from _gdb import * # noqa: F401,F403 =20 # 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/disass= embler.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 =20 # 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 =20 # Module global dictionary of gdb.disassembler.Disassembler objects. # The keys of this dictionary are bfd architecture names, or the