Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 73104079 authored by Pino Toscano's avatar Pino Toscano

python: PEP8 empty lines

Add empty lines as needed.
parent af272429
......@@ -89,11 +89,13 @@
from PyQt5 import QtWidgets
import TestObject1, TestObject2
class OwnWidget(QtWidgets.QLabel):
def __init__(self):
QtWidgets.QLabel.__init__(self)
self.setObjectName("MyLabelObjectName")
def test():
#label = QtGui.QLabel()
#label.setObjectName("MyQtLabelObjectName")
......@@ -103,4 +105,5 @@ def test():
obj = TestObject1.func_qwidget_qwidget(label)
print "test() ===========> label=%s object=%s" % (label, obj)
test()
#!/usr/bin/env kross
class TkTest:
def __init__(self):
import Tkinter
......@@ -29,4 +30,5 @@ class TkTest:
import tkMessageBox
tkMessageBox.showinfo("Callback2", "Callback2 called.")
TkTest()
......@@ -12,13 +12,16 @@ from TestObject2 import *
KrossAction = self
def testFunction(*args):
return args
def testFunctionException(*args):
raise Exception()
return args
class TestKross(unittest.TestCase):
""" Testcases to test the Kross python functionality for regressions. """
......@@ -316,6 +319,7 @@ class TestKross(unittest.TestCase):
class MyClass:
def __init__(self, result):
self.result = result
def myMethod(self):
return self.result
s = "my string"
......@@ -340,6 +344,7 @@ class TestKross(unittest.TestCase):
self.assert_(KrossAction.evaluate("1+2") == 3)
self.assert_(KrossAction.evaluate("testFunction(None, 99)") == [None, 99])
print "__name__ = %s" % __name__
#print "__main__ = %s %s" % (__main__, dir(__main__))
#print "TestObject3.name = %s" % TestObject3.name()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment