From 0f3cf2b6d309d887eed92dd2b6d4393883ccbc69 Mon Sep 17 00:00:00 2001 From: Merajul Arefin Date: Sat, 26 Nov 2022 11:19:27 +0600 Subject: [PATCH] Fixed annotation in typeinfo.LoadRegTypeLib (#384) [Issue] #380 [Problem] guid in typeinfo.LoadRegTypeLib could be both GUID and str type but annotation didn't specify that [Solution] Fixed annotation to describe function working correctly --- comtypes/typeinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comtypes/typeinfo.py b/comtypes/typeinfo.py index 9584449b..c591119d 100644 --- a/comtypes/typeinfo.py +++ b/comtypes/typeinfo.py @@ -509,8 +509,8 @@ def GetRecordInfoFromGuids(rGuidTypeLib, verMajor, verMinor, lcid, rGuidTypeInfo return ri # type: ignore def LoadRegTypeLib(guid, wMajorVerNum, wMinorVerNum, lcid=0): - # type: (str, int, int, int) -> ITypeLib - "Load a registered type library" + # type: (_UnionT[str, GUID], int, int, int) -> ITypeLib + """Load a registered type library""" tlib = POINTER(ITypeLib)() _oleaut32.LoadRegTypeLib(byref(GUID(guid)), wMajorVerNum, wMinorVerNum, lcid, byref(tlib)) return tlib # type: ignore