public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] gdb/testsuite: reformat gdb.python/pretty-print-call-by-hand.py
@ 2022-03-21 13:59 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2022-03-21 13:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

Run black on the file.

Change-Id: Ifb576137fb7158a0227173f61c1202f0695b3685
---
 gdb/testsuite/gdb.python/pretty-print-call-by-hand.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py
index f8f5df678f8f..5343af831a78 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py
@@ -21,21 +21,25 @@ class MytypePrinter:
         self.val = val
 
     def to_string(self):
-        calls = gdb.parse_and_eval('f()')
-        return "mytype is %s" % self.val['x']
+        calls = gdb.parse_and_eval("f()")
+        return "mytype is %s" % self.val["x"]
+
 
 def ec_lookup_function(val):
     typ = val.type
     if typ.code == gdb.TYPE_CODE_REF:
         typ = typ.target()
-    if str(typ) == 'struct mytype':
+    if str(typ) == "struct mytype":
         return MytypePrinter(val)
     return None
 
+
 def disable_lookup_function():
     ec_lookup_function.enabled = False
 
+
 def enable_lookup_function():
     ec_lookup_function.enabled = True
 
+
 gdb.pretty_printers.append(ec_lookup_function)
-- 
2.26.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-21 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 13:59 [pushed] gdb/testsuite: reformat gdb.python/pretty-print-call-by-hand.py Simon Marchi

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