Skip to content

Commit

Permalink
Fixed annotation in typeinfo.LoadRegTypeLib (#384)
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
j0ker70 authored Nov 26, 2022
1 parent 853f4ad commit 0f3cf2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comtypes/typeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f3cf2b

Please sign in to comment.