Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workarounds for importing safearrays. (#640) #645

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

newwingbird
Copy link
Contributor

related to #640

I adopted Junkmd's suggestions and run Ruff fmt imports
Thank you , your great "Good First Issue" document.

@junkmd
Copy link
Collaborator

junkmd commented Oct 29, 2024

Thanks.

Ruff fmt imports

Is this a command from the VSCode Ruff extension?
To ensure it can be replicated even in environments where that editor isn’t used, try running ruff check --select I --fix comtypes/automation.py to format the codebase.

I didn’t notice when posting the issue, but there are a few redundancies in the import section.
It would be helpful if you could make the following adjustments:

  1. Import COMError from _ctypes instead of comtypes
-from _ctypes import CopyComPointer
+from _ctypes import COMError, CopyComPointer
-from comtypes import (
-   BSTR,
-   COMMETHOD,
-   GUID,
-   IID,
-   STDMETHOD,
-   COMError,
-   IUnknown,
-   _CData,
-   _safearray,
-)
+from comtypes import BSTR, COMMETHOD, GUID, IID, STDMETHOD, IUnknown, _CData, _safearray
  1. Sort the import section by running ruff check --select I --fix comtypes/automation.py
  2. Format using ruff format comtypes/.

@junkmd junkmd added this to the 1.4.9 milestone Oct 29, 2024
@junkmd junkmd linked an issue Oct 29, 2024 that may be closed by this pull request
@junkmd junkmd added the coding style Topics related to style, formatters, linters, and delinting. label Oct 29, 2024
@junkmd junkmd changed the title Removed importing safearrays Remove workarounds for importing safearrays. (#640) Nov 13, 2024
@newwingbird
Copy link
Contributor Author

hi @junkmd

Thank you for the code review.
I have made the modification following the steps you pointed out and committed the changes.

junkmd added a commit to junkmd/pywinauto that referenced this pull request Nov 16, 2024
Copy link
Collaborator

@junkmd junkmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@junkmd junkmd merged commit e3b5e28 into enthought:main Nov 16, 2024
49 checks passed
@newwingbird newwingbird deleted the fix-importing-safearrays branch November 16, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding style Topics related to style, formatters, linters, and delinting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove workarounds for importing safearrays.
2 participants