From 3d5029bd2cde7880a21400dfb3db80c03fc954fb Mon Sep 17 00:00:00 2001 From: tholok97 <thomas.lokkeborg@mimer.no> Date: Wed, 19 Feb 2020 15:10:12 +0100 Subject: [PATCH] fikset linting error --- soitool/main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/soitool/main.py b/soitool/main.py index 405b5da..8079ab3 100644 --- a/soitool/main.py +++ b/soitool/main.py @@ -4,17 +4,17 @@ Bare her for å ha noe å teste mens vi setter opp repo """ -import unittest import sys -from PySide2 import QtGui, QtWidgets, QtTest, QtCore +from PySide2 import QtWidgets class CoolWidget(QtWidgets.QWidget): def __init__(self, text="Sample text", *args, **kwargs): super(CoolWidget, self).__init__(*args, **kwargs) - # settings this to None is only useful for one of the testing methods described in test_main.py + # settings this to None is only useful for one of the testing methods + # described in test_main.py self.dlg_input = None layout = QtWidgets.QHBoxLayout() @@ -26,7 +26,8 @@ class CoolWidget(QtWidgets.QWidget): self.setLayout(layout) def clickfunc(self): - # try-finally to set dialog to None is only useful for one of the testing methods described in test_main.py + # try-finally to set dialog to None is only useful for one of the + # testing methods described in test_main.py try: self.dlg_input = QtWidgets.QInputDialog(self) text, ok = self.dlg_input.getText( @@ -44,9 +45,9 @@ class CoolWidget(QtWidgets.QWidget): finally: self.dlg_input = None + if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) widget = CoolWidget("Custom text") widget.show() app.exec_() - -- GitLab