|
292 | 292 | # test record |
293 | 293 | from je_auto_control.utils.test_record.record_test_class import \ |
294 | 294 | test_record_instance |
295 | | -# Windows-only modules (ctypes.WINFUNCTYPE / Win32 API) — gate the |
296 | | -# import so ``import je_auto_control`` keeps working on macOS / Linux. |
297 | | -# The facade wrappers re-import these on demand and raise |
298 | | -# NotImplementedError for the Windows-only operations on other OSes. |
299 | | -import sys as _sys_for_platform_check # noqa: E402 |
300 | | -if _sys_for_platform_check.platform in ("win32", "cygwin", "msys"): |
301 | | - from je_auto_control.windows.window import windows_window_manage # noqa: E402 |
302 | | -else: |
303 | | - windows_window_manage = None # type: ignore[assignment] |
304 | | -del _sys_for_platform_check |
305 | 295 | from je_auto_control.wrapper.auto_control_image import locate_all_image |
306 | 296 | from je_auto_control.wrapper.auto_control_image import locate_and_click |
307 | 297 | from je_auto_control.wrapper.auto_control_image import locate_image_center |
|
338 | 328 | close_window_by_title, find_window, focus_window, list_windows, |
339 | 329 | show_window_by_title, wait_for_window, |
340 | 330 | ) |
| 331 | +# Windows-only modules (ctypes.WINFUNCTYPE / Win32 API) — gated so |
| 332 | +# ``import je_auto_control`` keeps working on macOS / Linux. Kept last |
| 333 | +# so every preceding statement is a plain top-level import (ruff E402). |
| 334 | +import sys as _sys_for_platform_check # noqa: E402 |
| 335 | +if _sys_for_platform_check.platform in ("win32", "cygwin", "msys"): |
| 336 | + from je_auto_control.windows.window import windows_window_manage # noqa: E402 |
| 337 | +else: |
| 338 | + windows_window_manage = None # type: ignore[assignment] |
| 339 | +del _sys_for_platform_check |
341 | 340 |
|
342 | 341 |
|
343 | 342 | def start_autocontrol_gui(*args, **kwargs): |
|
0 commit comments