Some checks failed
Windows project source guards / test (push) Has been cancelled
- release_watch.failure_pause_s caps the backoff exponent: 60.0 * 2 ** 1024 raised OverflowError after ~2 days without the update server (0.8.103). - MainWindow._when_built re-delivers startup results that arrive before initialize() built the pages (AttributeError in _startup_failed, 0.8.108). - MainWindow.nativeEvent hands pywintypes.error from qframelesswindow's GetCursorPos (lock screen, UAC desktop) to Qt instead of raising. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
387 B
Python
8 lines
387 B
Python
"""Errors raised by pywin32 calls (``pywintypes.error``), recognised without importing pywin32."""
|
|
from __future__ import annotations
|
|
|
|
|
|
def is_win32_error(exc: BaseException) -> bool:
|
|
"""True for ``pywintypes.error``: a Win32 API call refused by Windows (its own class, not an OSError)."""
|
|
kind = type(exc)
|
|
return kind.__name__ == "error" and kind.__module__ == "pywintypes"
|