public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tankut Baris Aktemur <aktemur@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] testsuite, python: reformat python files using black
Date: Mon, 19 Feb 2024 13:13:52 +0000 (GMT)	[thread overview]
Message-ID: <20240219131352.E79C5384F00A@sourceware.org> (raw)

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

commit d0446acf3d465b94b3cbdbf10aee8d3d5cafe8c5
Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Date:   Mon Feb 19 14:08:31 2024 +0100

    testsuite, python: reformat python files using black
    
    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/gdb.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 @@
 
 import gdb
 
+
 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
 
-        print('loading ' + event.new_objfile.filename)
+        print("loading " + event.new_objfile.filename)
         self.processed_objfile = True
 
         # There is no variable 'a'.  The command raises an exception.
-        gdb.execute('print a')
+        gdb.execute("print a")
+
 
 the_listener = 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 @@
 
 import gdb
 
+
 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
 
-        print('loading ' + event.new_objfile.filename)
+        print("loading " + event.new_objfile.filename)
         self.processed_objfile = True
 
-        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")
+
 
 the_listener = MyListener()

                 reply	other threads:[~2024-02-19 13:13 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=20240219131352.E79C5384F00A@sourceware.org \
    --to=aktemur@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).