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

Removed importing safearrays #645

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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