From 42e51bd92c9e82da8f27939373316ef4de6204d0 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 17 Sep 2026 19:16:18 +0200 Subject: [PATCH] ty: Ignore macOS-specific imports --- src/serena/dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serena/dashboard.py b/src/serena/dashboard.py index e186117c..d755495a 100644 --- a/src/serena/dashboard.py +++ b/src/serena/dashboard.py @@ -1033,7 +1033,7 @@ class SerenaDashboardTrayManager: @staticmethod def _run_in_ui_thread(fn: Callable[[], None]) -> None: """ - Runs a UI mutation in the thread in which the platform's UI toolkit requires it to run. + Runs a UI mutation in the thread in which the platform's UI toolkit requires it to run (where necessary). On macOS, AppKit demands that mutations of the status item happen on the main thread, and recent macOS versions terminate the process with SIGTRAP when they do not. The tray manager @@ -1043,7 +1043,7 @@ class SerenaDashboardTrayManager: :param fn: the UI mutation to run """ if sys.platform == "darwin": - from PyObjCTools import AppHelper + from PyObjCTools import AppHelper # ty: ignore[unresolved-import] AppHelper.callAfter(fn) else: