The line in __init__.py defining DWORD as an alias for c_ulong has been present since the project’s earliest commit, 938fbd5.
On the other hand, in commit 56908fd, which added shelllink.py two years later, DWORD was imported from ctypes.wintypes.
|
from ctypes.wintypes import DWORD, WIN32_FIND_DATAA, WIN32_FIND_DATAW, MAX_PATH |
The originator of ctypes and comtypes is the same person, and these libraries have historically evolved together, which has led to differences in symbol definitions like this.
Now, however, defining these aliases independently holds little value, so we could replace them where possible.
-DWORD = c_ulong
+from ctypes.wintypes import DWORD
-
We welcome keeping changes as small as possible per pull request, as it makes it easier for reviewers to check the changes.
-
If your PR addresses multiple rules or files, reviewers might consider it a large change and suggest splitting it into multiple PRs.
The line in
__init__.pydefiningDWORDas an alias forc_ulonghas been present since the project’s earliest commit, 938fbd5.comtypes/comtypes/__init__.py
Line 75 in 083c19e
On the other hand, in commit 56908fd, which added
shelllink.pytwo years later,DWORDwas imported fromctypes.wintypes.comtypes/comtypes/shelllink.py
Line 4 in 083c19e
The originator of
ctypesandcomtypesis the same person, and these libraries have historically evolved together, which has led to differences in symbol definitions like this.Now, however, defining these aliases independently holds little value, so we could replace them where possible.
We welcome keeping changes as small as possible per pull request, as it makes it easier for reviewers to check the changes.
If your PR addresses multiple rules or files, reviewers might consider it a large change and suggest splitting it into multiple PRs.