From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2104) id E79C5384F00A; Mon, 19 Feb 2024 13:13:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E79C5384F00A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708348432; bh=UJIAwtvqf9Wy7peo75KFxaJueVNsz08fpqrLLz4UNRQ=; h=From:To:Subject:Date:From; b=GJGaGcqqKQj+GE/ksxz/sQEXZ4sIOFpKS3kqS8I8jilo/vKWkGC4mQbOgT7E+PISF M+6c99KICpqC15Xc1gPCZm/7f7A7KJaJH/8xQiH1UfHiZxxbaOtMrpuLTpqvLSQdZZ ZNQy69X+2NYJWEp89uiDxJ2gC4DGU0kyHYAROYhY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tankut Baris Aktemur To: gdb-cvs@sourceware.org Subject: [binutils-gdb] testsuite, python: reformat python files using black X-Act-Checkin: binutils-gdb X-Git-Author: Tankut Baris Aktemur X-Git-Refname: refs/heads/master X-Git-Oldrev: f87eaf8ff3995a5888c6dc4996a20c770e6bcd36 X-Git-Newrev: d0446acf3d465b94b3cbdbf10aee8d3d5cafe8c5 Message-Id: <20240219131352.E79C5384F00A@sourceware.org> Date: Mon, 19 Feb 2024 13:13:52 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd0446acf3d46= 5b94b3cbdbf10aee8d3d5cafe8c5 commit d0446acf3d465b94b3cbdbf10aee8d3d5cafe8c5 Author: Tankut Baris Aktemur Date: Mon Feb 19 14:08:31 2024 +0100 testsuite, python: reformat python files using black =20 In the recent patch titled "gdb, python: selectively omit enabling stdin in gdb.execute", the black tool found formatting issues. Fix them. Diff: --- gdb/testsuite/gdb.python/py-cmd-exception.py | 6 ++++-- gdb/testsuite/gdb.python/py-cmd-prompt.py | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-cmd-exception.py b/gdb/testsuite/g= db.python/py-cmd-exception.py index e44b184ebd5..d37257d15c0 100644 --- a/gdb/testsuite/gdb.python/py-cmd-exception.py +++ b/gdb/testsuite/gdb.python/py-cmd-exception.py @@ -15,6 +15,7 @@ =20 import gdb =20 + class MyListener: def __init__(self): gdb.events.new_objfile.connect(self.handle_new_objfile_event) @@ -24,10 +25,11 @@ class MyListener: if self.processed_objfile: return =20 - print('loading ' + event.new_objfile.filename) + print("loading " + event.new_objfile.filename) self.processed_objfile =3D True =20 # There is no variable 'a'. The command raises an exception. - gdb.execute('print a') + gdb.execute("print a") + =20 the_listener =3D MyListener() diff --git a/gdb/testsuite/gdb.python/py-cmd-prompt.py b/gdb/testsuite/gdb.= python/py-cmd-prompt.py index ac1fdece046..b80a0c93fa4 100644 --- a/gdb/testsuite/gdb.python/py-cmd-prompt.py +++ b/gdb/testsuite/gdb.python/py-cmd-prompt.py @@ -15,6 +15,7 @@ =20 import gdb =20 + class MyListener: def __init__(self): gdb.events.new_objfile.connect(self.handle_new_objfile_event) @@ -25,12 +26,13 @@ class MyListener: if self.processed_objfile: return =20 - print('loading ' + event.new_objfile.filename) + print("loading " + event.new_objfile.filename) self.processed_objfile =3D True =20 - gdb.execute('add-inferior -no-connection') - gdb.execute('inferior 2') - gdb.execute('target remote ' + self.port) - gdb.execute('inferior 1') + gdb.execute("add-inferior -no-connection") + gdb.execute("inferior 2") + gdb.execute("target remote " + self.port) + gdb.execute("inferior 1") + =20 the_listener =3D MyListener()