enthought / comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Other
283 stars 96 forks source link

add `Incomplete` and `Hresult` to `hints.pyi` #532

Closed junkmd closed 2 months ago

junkmd commented 2 months ago

Hresult

The HRESULT will be returned by calling a com method with no [out] or [out, retval] arguments.

To replicate this runtime behavior, such methods will now be annotated with an integer type for their return value.

However, leaving it as int could lead to misinterpretation of the value, so a type alias named Hresult is prepared to represent that it is one of the integer values of HRESULT.

Incomplete

Parts that cannot be annotated with a detailed type by the typeannotator will be annotated as Incomplete. This name was inspired by typeshed.

junkmd commented 2 months ago

CIs are passed.

https://ci.appveyor.com/project/pywinauto/pywinauto/builds/49669170

https://github.com/enthought/comtypes/actions/runs/8792259118