From df43156bb35a442c4988631e1c2b0bd0fc11e618 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 29 Apr 2021 10:09:33 +0200 Subject: Examples: Fix some space-related flake warnings Task-number: PYSIDE-1112 Change-Id: Ib8991199e4822673d6a25cba0023dbe3b03f5938 Reviewed-by: Cristian Maureira-Fredes --- examples/macextras/macpasteboardmime/macpasteboardmime.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/macextras') diff --git a/examples/macextras/macpasteboardmime/macpasteboardmime.py b/examples/macextras/macpasteboardmime/macpasteboardmime.py index 59220ec7a..35e5d6180 100644 --- a/examples/macextras/macpasteboardmime/macpasteboardmime.py +++ b/examples/macextras/macpasteboardmime/macpasteboardmime.py @@ -52,8 +52,9 @@ except ImportError: messageBox.exec_() sys.exit(1) + class VCardMime(QtMacExtras.QMacPasteboardMime): - def __init__(self, t = QtMacExtras.QMacPasteboardMime.MIME_ALL): + def __init__(self, t=QtMacExtras.QMacPasteboardMime.MIME_ALL): super().__init__(t) def convertorName(self): @@ -87,6 +88,7 @@ class VCardMime(QtMacExtras.QMacPasteboardMime): # Todo: implement! return [] + class TestWidget(QtWidgets.QWidget): def __init__(self, parent=None): super().__init__(parent) @@ -112,11 +114,12 @@ class TestWidget(QtWidgets.QWidget): def contentsDropEvent(self, e): if e.mimeData().hasFormat("application/x-mycompany-VCard"): - s = e.mimeData().data( "application/x-mycompany-VCard" ) + s = e.mimeData().data("application/x-mycompany-VCard") # s now contains text of vcard self.label2.setText(str(s)) e.acceptProposedAction() + if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) QtMacExtras.qRegisterDraggedTypes(["public.vcard"]) -- cgit v1.2.3