From a930f5b9024649efd7fb36a569c68683b9fe9802 Mon Sep 17 00:00:00 2001 From: A_D Date: Fri, 23 Dec 2022 18:25:14 +0200 Subject: [PATCH] protocol.py: Make mypy happy This adds an assert that mypy will understand, and a type ignore because it seems to ignore those asserts in imports --- protocol.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/protocol.py b/protocol.py index 290a7031..f0e1b4a8 100644 --- a/protocol.py +++ b/protocol.py @@ -121,9 +121,13 @@ elif (config.auth_force_edmc_protocol and not is_wine and not config.auth_force_localserver )): + # This could be false if you use auth_force_edmc_protocol, but then you get to keep the pieces + assert sys.platform == 'win32' # spell-checker: words HBRUSH HICON WPARAM wstring WNDCLASS HMENU HGLOBAL from ctypes import windll # type: ignore - from ctypes import POINTER, WINFUNCTYPE, Structure, byref, c_long, c_void_p, create_unicode_buffer, wstring_at + from ctypes import ( # type: ignore + POINTER, WINFUNCTYPE, Structure, byref, c_long, c_void_p, create_unicode_buffer, wstring_at + ) from ctypes.wintypes import ( ATOM, BOOL, DWORD, HBRUSH, HGLOBAL, HICON, HINSTANCE, HMENU, HWND, INT, LPARAM, LPCWSTR, LPVOID, LPWSTR, MSG, UINT, WPARAM