Repository navigation
Use overlapped signatures of _winapi functions - #2723
Conversation
srittau
left a comment
There was a problem hiding this comment.
A few notes regarding the overlapped flag below.
|
@srittau I can provide an overload if overlapped is @overload
def ConnectNamedPipe(handle: int, overlapped: Literal[True, 1]) -> Overlapped: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Optional[Literal[False, 0]] = None) -> None: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Union[bool, int, None] = None) -> Optional[Overlapped]: ...but we aren't at the point where I can start using Literal types in typeshed, correct? |
|
Um, good point. I blame too much typeshed lately. Then we should just |
|
I realized I was wrong, and |
srittau
left a comment
There was a problem hiding this comment.
Thank you! A good case for literal types.
|
Indeed! Looking forward to being able to use them :) |
For python/mypy#6148.