Skip to content

pywin32 annotations improvements#11177

Merged
srittau merged 4 commits intopython:mainfrom
Avasam:pywin32-annotations-improvements
Dec 18, 2023
Merged

pywin32 annotations improvements#11177
srittau merged 4 commits intopython:mainfrom
Avasam:pywin32-annotations-improvements

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Dec 17, 2023

Some targeted pywin32 type annotations improvements:

  1. Complete all methods to implement BitBlt screen capture, whether object-oriented or through handle references. Fixes many pyright: reportUnknownMemberType in https://github.com/Toufool/AutoSplit/blob/2db900608b9a45c26f9965af46d659b0ef05ca9e/src/capture_method/BitBltCaptureMethod.py#L38-L84
  2. Type win32comext.shell.shell.SetCurrentProcessExplicitAppUserModelID for https://github.com/Toufool/AutoSplit/blob/2db900608b9a45c26f9965af46d659b0ef05ca9e/src/AutoSplit.py#L58
  3. Fix win32print : WritePrinter accept bytes #11160 . WritePrinter accepts a "bytes-like object"

All tested locally.

@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

AutoSplit (https://github.com/Toufool/AutoSplit)
+ src/region_selection.py:297:13: error: Redundant cast to "int"  [redundant-cast]
+ src/region_selection.py:298:13: error: Redundant cast to "int"  [redundant-cast]
+ src/region_selection.py:299:17: error: Redundant cast to "int"  [redundant-cast]
+ src/region_selection.py:300:18: error: Redundant cast to "int"  [redundant-cast]

@srittau srittau merged commit 9652687 into python:main Dec 18, 2023
@Avasam Avasam deleted the pywin32-annotations-improvements branch December 18, 2023 15:14
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.

win32print : WritePrinter accept bytes

2 participants