Skip to content

[pywin32] Improve pipe and device I/O typing - #16456

Open
Robolightning wants to merge 3 commits into
python:mainfrom
StableKite:typing/pywin32-stablekite-surface
Open

Robolightning wants to merge 3 commits into
python:mainfrom
StableKite:typing/pywin32-stablekite-surface

Conversation

@Robolightning

Copy link
Copy Markdown

This improves typing for several pywin32 pipe and device-I/O APIs.

Changes:

  • type ConnectNamedPipe as returning int
  • type CreateNamedPipe numeric parameters and WaitNamedPipe.timeout as int
  • type PeekNamedPipe as returning tuple[bytes, int, int]
  • add DeviceIoControl overloads for synchronous bytes output, overlapped memoryview output, and caller-supplied writable buffers

Validation:

  • mypy over the two changed stubs: pass
  • typeshed stubtest for win32pipe and win32file on Windows: pass
  • strict latest Pyright (1.1.414) consumer: 0 errors, 0 warnings, 0 informations
  • real pywin32 312 named-pipe runtime smoke: pass

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant