From 174bf2db1fd052da41bcec072aecf496f1b9dc42 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 29 Jun 2024 03:55:15 +0100 Subject: [PATCH] change c_voidp to c_void_p. fixes mypy 'has no attribute' see https://github.com/python/mypy/issues/4926 --- voicemeeterlib/inst.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/voicemeeterlib/inst.py b/voicemeeterlib/inst.py index 7eb7ca3..8fa90f8 100644 --- a/voicemeeterlib/inst.py +++ b/voicemeeterlib/inst.py @@ -5,7 +5,7 @@ from pathlib import Path from .error import InstallError -bits = 64 if ct.sizeof(ct.c_voidp) == 8 else 32 +BITS = 64 if ct.sizeof(ct.c_void_p) == 8 else 32 if platform.system() != "Windows": raise InstallError("Only Windows OS supported") @@ -17,7 +17,7 @@ REG_KEY = "\\".join( None, ( "SOFTWARE", - "WOW6432Node" if bits == 64 else "", + "WOW6432Node" if BITS == 64 else "", "Microsoft", "Windows", "CurrentVersion", @@ -39,7 +39,7 @@ try: except FileNotFoundError as e: raise InstallError("Unable to fetch DLL path from the registry") from e -DLL_NAME = f'VoicemeeterRemote{"64" if bits == 64 else ""}.dll' +DLL_NAME = f'VoicemeeterRemote{"64" if BITS == 64 else ""}.dll' dll_path = vm_parent.joinpath(DLL_NAME) if not dll_path.is_file():