From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 1BBDA3857370; Fri, 15 Jul 2022 13:56:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BBDA3857370 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] Run 'black' on gdb X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 9afca381e2e46ccee433ce09001506e7683b273f X-Git-Newrev: bf4d777d39da152371dec9df08db1ef4179f7ad9 Message-Id: <20220715135648.1BBDA3857370@sourceware.org> Date: Fri, 15 Jul 2022 13:56:48 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2022 13:56:48 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dbf4d777d39da= 152371dec9df08db1ef4179f7ad9 commit bf4d777d39da152371dec9df08db1ef4179f7ad9 Author: Tom Tromey Date: Thu Jul 14 12:39:56 2022 -0600 Run 'black' on gdb =20 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'] =3D events + +sys.modules["gdb.events"] =3D events =20 =20 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 =3D 'on' + value =3D "on" else: - value =3D 'off' + value =3D "off" execute("set " + name + " " + str(value), to_string=3DTrue) =20 =20 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 !=3D expected_val: raise gdb.GdbError("global_var is 0x%x, expected 0x%x" % (val, exp= ected_val)) =20 + # 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") + =20 # Set the 'X' packet to the remote target to set a global variable. # Checks that we can send byte values.