Skip to content

Ensure for 3rd-party imports we only import packages and modules #637

Closed as not planned

Description

@leofang

I think we should just import pywintypes and then use it explicitly like except pywintypes.error as e:. I agree it is very unclear (and I did not know error is a legit exception type).

Originally posted by @leofang in #625 (comment)

I like Google's Python style guide on this part:
https://google.github.io/styleguide/pyguide.html#22-imports

Use import statements for packages and modules only, not for individual types, classes, or functions.

Activity

  1. added
    enhancementAny code-related improvements
    P1Medium priority - Should do
    cuda.bindingsEverything related to the cuda.bindings module
    cuda.coreEverything related to the cuda.core module
    on May 14, 2025
  2. self-assigned this
    on May 14, 2025
  3. removed their assignment
    on Mar 24, 2026
  4. rwgk commented on Mar 24, 2026

    @rwgk
    Contributor

    I unassigned myself: is this issue still relevant, in a coding agent world?

    @cpcloud for visibility

  5. cpcloud commented on Mar 24, 2026

    @cpcloud
    Contributor

    Feels overly restrictive and unnecessary but also someone probably needs to care about this to make it happen. I'll close it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priority - Should docuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core moduleenhancementAny code-related improvements

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions