Use one line conditional assignment

Use one line conditional assignement instead of if else block.
The intent is now clearer and the code is easier to read.
This commit is contained in:
digitalfrost 2022-08-04 09:45:47 +02:00
parent c1ae1872d0
commit a39fed1dc3

View file

@ -204,10 +204,7 @@ class MachineErrorChecker(QObject):
self._has_errors = result self._has_errors = result
self.hasErrorUpdated.emit() self.hasErrorUpdated.emit()
self._machine_manager.stacksValidationChanged.emit() self._machine_manager.stacksValidationChanged.emit()
if keys_to_recheck is None: self._keys_to_check = keys_to_recheck if keys_to_recheck else set()
self._keys_to_check = set()
else:
self._keys_to_check = keys_to_recheck
self._need_to_check = False self._need_to_check = False
self._check_in_progress = False self._check_in_progress = False
self.needToWaitForResultChanged.emit() self.needToWaitForResultChanged.emit()