Skip to content

Commit 446f52e

Browse files
authored
fix IPersist.GetClassID to TYPE_CHECKING only method from Callable annotation (#451)
1 parent 9238cc7 commit 446f52e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

comtypes/__init__.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,12 @@ class IPersist(IUnknown):
857857
COMMETHOD([], HRESULT, "GetClassID", (["out"], POINTER(GUID), "pClassID")),
858858
]
859859
if TYPE_CHECKING:
860-
# Returns the CLSID that uniquely represents an object class that
861-
# defines the code that can manipulate the object's data.
862-
GetClassID: Callable[[], GUID]
860+
# Should this be "normal" method that calls `self._GetClassID`?
861+
def GetClassID(self) -> GUID:
862+
"""Returns the CLSID that uniquely represents an object class that
863+
defines the code that can manipulate the object's data.
864+
"""
865+
...
863866

864867

865868
class IServiceProvider(IUnknown):

0 commit comments

Comments
 (0)