[Obvious] testsuite, python: reformat python files using black

Message ID 20240219133041.1290138-1-tankut.baris.aktemur@intel.com
State New
Headers
Series [Obvious] testsuite, python: reformat python files using black |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Aktemur, Tankut Baris Feb. 19, 2024, 1:30 p.m. UTC
  I received a report from the buildbot that there are Python format
problems in a commit I pushed today.

This patch fixes those problems.  I already pushed as obvious.
Sorry for this oversight.

Regards
Baris

=========================================

In the recent patch titled "gdb, python: selectively omit enabling
stdin in gdb.execute", the black tool found formatting issues.  Fix
them.
---
 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(-)
  

Patch

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()