Skip to content

Commit 0f3cf2b

Browse files
authored
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
1 parent 853f4ad commit 0f3cf2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

comtypes/typeinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ def GetRecordInfoFromGuids(rGuidTypeLib, verMajor, verMinor, lcid, rGuidTypeInfo
509509
return ri # type: ignore
510510

511511
def LoadRegTypeLib(guid, wMajorVerNum, wMinorVerNum, lcid=0):
512-
# type: (str, int, int, int) -> ITypeLib
513-
"Load a registered type library"
512+
# type: (_UnionT[str, GUID], int, int, int) -> ITypeLib
513+
"""Load a registered type library"""
514514
tlib = POINTER(ITypeLib)()
515515
_oleaut32.LoadRegTypeLib(byref(GUID(guid)), wMajorVerNum, wMinorVerNum, lcid, byref(tlib))
516516
return tlib # type: ignore

0 commit comments

Comments
 (0)