aboutsummaryrefslogtreecommitdiffstats
path: root/examples/network/blockingfortuneclient/blockingfortuneclient.py
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2023-12-05 13:00:27 +0100
committerAdrian Herrmann <adrian.herrmann@qt.io>2023-12-06 11:52:07 +0100
commit592c734e57b00040329b49dfbe11869980dff88a (patch)
tree79fa3498cb974e5026415971ec83107b92b65919 /examples/network/blockingfortuneclient/blockingfortuneclient.py
parentc0329cff9d7378b8bf6a17baeb97bf5a240977fc (diff)
Examples: Fix a number of flake8 errors (part 1)
First batch, including low-hanging fruit like Alignments, whitespaces, line length, indents, etc. Pick-to: 6.6 Change-Id: I55966876077f7fddfdc82cbe376677af9995f329 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/network/blockingfortuneclient/blockingfortuneclient.py')
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.py b/examples/network/blockingfortuneclient/blockingfortuneclient.py
index 816ef67f5..d0dd7e0ad 100644
--- a/examples/network/blockingfortuneclient/blockingfortuneclient.py
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.py
@@ -110,7 +110,7 @@ class BlockingClient(QWidget):
port_label.setBuddy(self._port_line_edit)
self._status_label = QLabel(
- "This example requires that you run the Fortune Server example as well.")
+ "This example requires that you run the Fortune Server example as well.")
self._status_label.setWordWrap(True)
self._get_fortune_button = QPushButton("Get Fortune")
@@ -145,7 +145,7 @@ class BlockingClient(QWidget):
def request_new_fortune(self):
self._get_fortune_button.setEnabled(False)
self.thread.request_new_fortune(self._host_line_edit.text(),
- int(self._port_line_edit.text()))
+ int(self._port_line_edit.text()))
def show_fortune(self, nextFortune):
if nextFortune == self._current_fortune:
@@ -159,22 +159,22 @@ class BlockingClient(QWidget):
def display_error(self, socketError, message):
if socketError == QAbstractSocket.HostNotFoundError:
QMessageBox.information(self, "Blocking Fortune Client",
- "The host was not found. Please check the host and port "
- "settings.")
+ "The host was not found. Please check the host and port "
+ "settings.")
elif socketError == QAbstractSocket.ConnectionRefusedError:
QMessageBox.information(self, "Blocking Fortune Client",
- "The connection was refused by the peer. Make sure the "
- "fortune server is running, and check that the host name "
- "and port settings are correct.")
+ "The connection was refused by the peer. Make sure the "
+ "fortune server is running, and check that the host name "
+ "and port settings are correct.")
else:
QMessageBox.information(self, "Blocking Fortune Client",
- f"The following error occurred: {message}.")
+ f"The following error occurred: {message}.")
self._get_fortune_button.setEnabled(True)
def enable_get_fortune_button(self):
- self._get_fortune_button.setEnabled(self._host_line_edit.text() != '' and
- self._port_line_edit.text() != '')
+ self._get_fortune_button.setEnabled(self._host_line_edit.text() != ''
+ and self._port_line_edit.text() != '')
if __name__ == '__main__':