public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Run 'black' on gdb
Date: Fri, 15 Jul 2022 13:56:48 +0000 (GMT)	[thread overview]
Message-ID: <20220715135648.1BBDA3857370@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bf4d777d39da152371dec9df08db1ef4179f7ad9

commit bf4d777d39da152371dec9df08db1ef4179f7ad9
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Jul 14 12:39:56 2022 -0600

    Run 'black' on gdb
    
    Running 'black' on gdb fixed a couple of small issues.  This patch is
    the result.

Diff:
---
 gdb/python/lib/gdb/__init__.py             | 7 ++++---
 gdb/testsuite/gdb.python/py-send-packet.py | 6 ++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py
index 9e9978ef30e..5b10e3e2381 100644
--- a/gdb/python/lib/gdb/__init__.py
+++ b/gdb/python/lib/gdb/__init__.py
@@ -30,7 +30,8 @@ from _gdb import *
 # Historically, gdb.events was always available, so ensure it's
 # still available without an explicit import.
 import _gdbevents as events
-sys.modules['gdb.events'] = events
+
+sys.modules["gdb.events"] = events
 
 
 class _GdbFile(object):
@@ -243,9 +244,9 @@ def set_parameter(name, value):
     # can return them, but they can't be passed to 'set' this way.
     if isinstance(value, bool):
         if value:
-            value = 'on'
+            value = "on"
         else:
-            value = 'off'
+            value = "off"
     execute("set " + name + " " + str(value), to_string=True)
 
 
diff --git a/gdb/testsuite/gdb.python/py-send-packet.py b/gdb/testsuite/gdb.python/py-send-packet.py
index ae70b852538..26deeb1e40d 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.py
+++ b/gdb/testsuite/gdb.python/py-send-packet.py
@@ -114,10 +114,12 @@ def check_global_var(expected_val):
     if val != expected_val:
         raise gdb.GdbError("global_var is 0x%x, expected 0x%x" % (val, expected_val))
 
+
 # Return a bytes object representing an 'X' packet header with
 # address ADDR.
-def xpacket_header (addr):
-    return ("X%x,4:" % addr).encode('ascii')
+def xpacket_header(addr):
+    return ("X%x,4:" % addr).encode("ascii")
+
 
 # Set the 'X' packet to the remote target to set a global variable.
 # Checks that we can send byte values.


                 reply	other threads:[~2022-07-15 13:56 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=20220715135648.1BBDA3857370@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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).