Remove nested if statement

This commit is contained in:
kramo
2023-05-15 18:22:22 +02:00
parent 3127f4a898
commit 25a340015c

View File

@@ -312,12 +312,11 @@ class PreferencesWindow(Adw.PreferencesWindow):
) )
def check_import(self, *_args): def check_import(self, *_args):
if self.import_changed:
# This checks whether any of the switches that did actually change their state # This checks whether any of the switches that did actually change their state
# would have an effect on the outcome of the import action # would have an effect on the outcome of the import action
# and if they would, it initiates it. # and if they would, it initiates it.
if any( if self.import_changed and any(
(value := widget.get_property(prop[0])) and value != prop[1] (value := widget.get_property(prop[0])) and value != prop[1]
for widget, prop in self.import_changed_widgets.items() for widget, prop in self.import_changed_widgets.items()
): ):