gdb/testsuite: reformat gdb.python/pretty-print-call-by-hand.py
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 21 Mar 2022 13:59:01 +0000 (09:59 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 21 Mar 2022 13:59:01 +0000 (09:59 -0400)
Run black on the file.

Change-Id: Ifb576137fb7158a0227173f61c1202f0695b3685

gdb/testsuite/gdb.python/pretty-print-call-by-hand.py

index f8f5df678f8fa5c74f0567ac5d77f1b6247e1a9d..5343af831a781df86b38823cb6e0f66c6cfab87d 100644 (file)
@@ -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)