From 0bfec5d046f4d2b335566851463a5d0d4530c3c2 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Tue, 10 Mar 2026 09:35:29 +0000 Subject: [PATCH] Apply suggestions from code review of branch dynamic-ui Co-authored-by: Joe Knapper --- .../things/scan_workflows.py | 2 +- src/openflexure_microscope_server/ui.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openflexure_microscope_server/things/scan_workflows.py b/src/openflexure_microscope_server/things/scan_workflows.py index 9d80390d..7679207a 100644 --- a/src/openflexure_microscope_server/things/scan_workflows.py +++ b/src/openflexure_microscope_server/things/scan_workflows.py @@ -577,7 +577,7 @@ class HistoScanWorkflow(RectGridWorkflow[HistoScanSettingsModel]): def set_background(self) -> None: """Set the background for this background detector. - This sets the background for this workflows background detector as opposed to + This sets the background for this workflow's background detector as opposed to the active background detector for the camera. """ image_array = self._cam.grab_as_array(stream_name="lores") diff --git a/src/openflexure_microscope_server/ui.py b/src/openflexure_microscope_server/ui.py index 771dccc7..1ed23127 100644 --- a/src/openflexure_microscope_server/ui.py +++ b/src/openflexure_microscope_server/ui.py @@ -39,7 +39,7 @@ class SafeHTMLParser(HTMLParser): the tag if it is our allowed list. We re-write the tag so no extra attributes can be added. - No tags can have attributes except for ``a`` tags only allows ``href``. We then + No tags can have attributes except for ``a`` tags, why only allow ``href``. We then append ``target="_blank" rel="noopener noreferrer"`` to ensure the link opens in a new window. @@ -177,7 +177,7 @@ class ActionButton(BaseModel): response_is_success_message: bool = False """Set True to use the action response as the success message. - If set ``success_message`` has is never used. + If ``success_message`` is set, this is never used. """ success_message: str = "Success!" @@ -292,9 +292,9 @@ class UIElementList(RootModel[list[UIElementModels]]): Note! Two important things to consider: * This cannot be the return of a lt.property. To fully describe the UI recursion - is used. Web of Things DataSchema doesn't support rectursion. Use a + is used. Web of Things DataSchema doesn't support recursion. Use an lt.endpoint instead - * If the module using this class imoports future annotations then this will cause + * If the module using this class imports future annotations then this will cause havoc with pydantics forward references. """