From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1BDA93858D1E for ; Mon, 13 Mar 2023 15:41:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BDA93858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678722115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOENtURPjw9d0puaUmFsLejjDQXkzK50F3PnExc37Vg=; b=PktBw4IZOm/4E1hWL0ZGn0bUR15rYXxGB87poaVU2+sVyC77R9oJNTJGWz9w2V+etFKc2B DLl0cpkDsT2lj3bF6GnRFQT8GiNsCX9pDG2R+kPURBrDruh4h+gunQVCxxWxqASlVp8QhY u+5CM43jVDiQYK65J67ugg9zaluWLs4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-386-EM5Il6XQOCGr41uwRcTRzA-1; Mon, 13 Mar 2023 11:41:54 -0400 X-MC-Unique: EM5Il6XQOCGr41uwRcTRzA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37D0D800B23 for ; Mon, 13 Mar 2023 15:41:54 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D25E400F51; Mon, 13 Mar 2023 15:41:53 +0000 (UTC) From: Bruno Larsen To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [OBV/PATCH] [gdb/obvious]: fix python formatting for test gdb.python/py-typeprint.py Date: Mon, 13 Mar 2023 16:41:39 +0100 Message-Id: <20230313154138.123200-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: python black formatter was complaining about the formatting of gdb.python/py-typeprint.py, so this commit corrects it. --- 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()) -- 2.39.2