public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/obvious]: fix python formatting for test gdb.python/py-typeprint.py
@ 2023-03-13 15:40 Bruno Larsen
  0 siblings, 0 replies; only message in thread
From: Bruno Larsen @ 2023-03-13 15:40 UTC (permalink / raw)
  To: gdb-cvs

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

commit 1878b6b5f67ba79ac0903b0fd5768adafeb55109
Author: Bruno Larsen <blarsen@redhat.com>
Date:   Mon Mar 13 16:34:41 2023 +0100

    [gdb/obvious]: fix python formatting for test gdb.python/py-typeprint.py
    
    python black formatter was complaining about the formatting of
    gdb.python/py-typeprint.py, so this commit corrects it.

Diff:
---
 gdb/testsuite/gdb.python/py-typeprint.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-typeprint.py b/gdb/testsuite/gdb.python/py-typeprint.py
index aac42a1a99a..899650b45bd 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.py
+++ b/gdb/testsuite/gdb.python/py-typeprint.py
@@ -15,6 +15,7 @@
 
 import gdb
 
+
 class StringRecognizer(object):
     def __init__(self):
         self.enabled = True
@@ -36,22 +37,26 @@ class StringTypePrinter(object):
 
 gdb.type_printers.append(StringTypePrinter())
 
+
 class OtherRecognizer(object):
     def __init__(self):
         self.enabled = True
 
     def recognize(self, type_obj):
-        if type_obj.tag == 'Other':
-            return 'Another'
+        if type_obj.tag == "Other":
+            return "Another"
         return None
 
+
 class OtherTypePrinter(object):
     def __init__(self):
-        self.name = 'other'
+        self.name = "other"
         self.enabled = True
 
     def instantiate(self):
         return OtherRecognizer()
 
+
 import gdb.types
+
 gdb.types.register_type_printer(gdb.objfiles()[0], OtherTypePrinter())

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

only message in thread, other threads:[~2023-03-13 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 15:40 [binutils-gdb] [gdb/obvious]: fix python formatting for test gdb.python/py-typeprint.py Bruno Larsen

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