From 4c5139e8a2e05c7c5aa37e23d456af7a120119bc Mon Sep 17 00:00:00 2001 From: artem30801 Date: Sun, 3 Nov 2019 20:07:29 +0300 Subject: [PATCH] Simplify lambdas --- Server/copter_table_models.py | 6 +++--- Server/server_qt.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/copter_table_models.py b/Server/copter_table_models.py index dd669bf..ddbab65 100644 --- a/Server/copter_table_models.py +++ b/Server/copter_table_models.py @@ -111,15 +111,15 @@ class CopterDataModel(QtCore.QAbstractTableModel): def flip_ready(self, contents=()): contents = contents or self.data_contents - return filter(lambda x: flip_checks(x), contents) # possibly change as takeoff checks + return filter(flip_checks, contents) # possibly change as takeoff checks def calibrating(self, contents=()): contents = contents or self.data_contents - return filter(lambda x: calibrating_check(x), contents) + return filter(calibrating_check, contents) def calibration_ready(self, contents=()): contents = contents or self.data_contents - return filter(lambda x: calibration_ready_check(x), contents) + return filter(calibration_ready_check, contents) def get_row_index(self, row_data): try: diff --git a/Server/server_qt.py b/Server/server_qt.py index 298bce8..a0e6f3e 100644 --- a/Server/server_qt.py +++ b/Server/server_qt.py @@ -556,7 +556,7 @@ class MainWindow(QtWidgets.QMainWindow): @messaging.message_callback("telem") def get_telem_data(*args, **kwargs): - message = kwargs.get("message", None) + message = kwargs.get("value") window.update_table_data(message)