From 1f43d1cc53d3ac8c0eae5c68906f530f9617df1c Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 18 Mar 2026 12:40:55 +0000 Subject: [PATCH] Explicit windows check before sigkill for mypy --- src/openflexure_microscope_server/stitching.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/stitching.py b/src/openflexure_microscope_server/stitching.py index 49916e10..e6e92e6b 100644 --- a/src/openflexure_microscope_server/stitching.py +++ b/src/openflexure_microscope_server/stitching.py @@ -11,6 +11,7 @@ import os import shlex import signal import subprocess +import sys import threading from typing import IO, Optional @@ -221,7 +222,8 @@ class PreviewStitcher(BaseStitcher): except lt.exceptions.InvocationCancelledError as e: with self._popen_lock: if self._popen_obj is not None: - if IS_WINDOWS: + # mypy requires the check to be here + if sys.platform == "win32": # Windows has no SIGKILL self._popen_obj.kill() else: