From 72d96ecd6ac44cdf942cd052ae3d1ca84823aea3 Mon Sep 17 00:00:00 2001 From: David Perl Date: Mon, 27 Jul 2026 15:00:26 +0200 Subject: [PATCH] style: formatter again --- src/aare/devices/workflow_tools.py | 8 ++++++-- src/aare/gui/gui.py | 12 ++++++------ src/aare/gui/tutorials/tutorial_runtime.py | 6 +++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/aare/devices/workflow_tools.py b/src/aare/devices/workflow_tools.py index aa8357eb..88cb8377 100755 --- a/src/aare/devices/workflow_tools.py +++ b/src/aare/devices/workflow_tools.py @@ -14,11 +14,15 @@ def wait_position(motor, target, tolerance=None, timeout=60.0): elif isinstance(position, (bytes, str)): tst = "'%s' == '%s'" if isinstance(position, bytes): + def ltst(x, y, z): return ( - x.lower() == y.lower().encode() if isinstance(y, str) else x.lower() == y.lower() - ) + x.lower() == y.lower().encode() + if isinstance(y, str) + else x.lower() == y.lower() + ) else: + def ltst(x, y, z): return x.lower() == y.lower() else: diff --git a/src/aare/gui/gui.py b/src/aare/gui/gui.py index 777bb475..daaacbad 100644 --- a/src/aare/gui/gui.py +++ b/src/aare/gui/gui.py @@ -200,12 +200,12 @@ def main(): logger.error(f"Traceback: {traceback.format_exc()}") QMessageBox.critical( - None, - "Fatal Error", - f"An error occurred during startup. See console for details." - f"\nPlease check the server is running and your network connection." - f"\n\n{str(e)}\n\n", - ) + None, + "Fatal Error", + f"An error occurred during startup. See console for details." + f"\nPlease check the server is running and your network connection." + f"\n\n{str(e)}\n\n", + ) sys.exit(1) diff --git a/src/aare/gui/tutorials/tutorial_runtime.py b/src/aare/gui/tutorials/tutorial_runtime.py index acee7266..27d1b996 100644 --- a/src/aare/gui/tutorials/tutorial_runtime.py +++ b/src/aare/gui/tutorials/tutorial_runtime.py @@ -189,7 +189,11 @@ class CompletionEvaluator: self._event_bus = event_bus def is_step_complete( - self, step: TutorialStepDefinition, context: TutorialContext, *, target_clicked: bool = False + self, + step: TutorialStepDefinition, + context: TutorialContext, + *, + target_clicked: bool = False, ) -> bool: if step.completion is None: return True