From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [pushed] Remove unused imports from gdb's Python code
Date: Mon, 13 Feb 2023 10:25:47 -0700 [thread overview]
Message-ID: <20230213172547.2266090-1-tromey@adacore.com> (raw)
The "sys" import is unused in several Python files. This removes this
line from all the places where it is unnecessary.
---
gdb/python/lib/gdb/command/explore.py | 1 -
gdb/python/lib/gdb/printer/bound_registers.py | 2 --
gdb/python/lib/gdb/printing.py | 1 -
gdb/python/lib/gdb/xmethod.py | 1 -
4 files changed, 5 deletions(-)
diff --git a/gdb/python/lib/gdb/command/explore.py b/gdb/python/lib/gdb/command/explore.py
index db72f33e9db..821bfb081ea 100644
--- a/gdb/python/lib/gdb/command/explore.py
+++ b/gdb/python/lib/gdb/command/explore.py
@@ -17,7 +17,6 @@
"""Implementation of the GDB 'explore' command using the GDB Python API."""
import gdb
-import sys
class Explorer(object):
diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py
index e1566750ec0..08f30cbf286 100644
--- a/gdb/python/lib/gdb/printer/bound_registers.py
+++ b/gdb/python/lib/gdb/printer/bound_registers.py
@@ -14,8 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import sys
-
import gdb.printing
diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
index d6b7b85e404..740a96e60eb 100644
--- a/gdb/python/lib/gdb/printing.py
+++ b/gdb/python/lib/gdb/printing.py
@@ -19,7 +19,6 @@
import gdb
import gdb.types
import re
-import sys
class PrettyPrinter(object):
diff --git a/gdb/python/lib/gdb/xmethod.py b/gdb/python/lib/gdb/xmethod.py
index ab6cd28c303..ef7d2011e1c 100644
--- a/gdb/python/lib/gdb/xmethod.py
+++ b/gdb/python/lib/gdb/xmethod.py
@@ -18,7 +18,6 @@
import gdb
import re
-import sys
class XMethod(object):
--
2.39.1
reply other threads:[~2023-02-13 17:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230213172547.2266090-1-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).