]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Suppress star import errors
authorTom Tromey <tromey@adacore.com>
Tue, 19 Mar 2024 16:55:30 +0000 (10:55 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Apr 2024 16:58:37 +0000 (10:58 -0600)
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.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/python/lib/gdb/__init__.py
gdb/python/lib/gdb/disassembler.py

index 9f0f6dc1e5d99350eba44c44e9186dee098602c9..2ff1f95c8fd2de7d5991051e3929df864ed16fd9 100644 (file)
@@ -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.
index 2d313ae2122bdb1c81d196033b9a9e7776fe85f4..af7dcc5f6a861395d35f02ba52ec6a081a661c58 100644 (file)
@@ -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