Skip to content

fix: import _INPUTUnion from enums to fix NameError#108

Merged
Jeomon merged 1 commit intoCursorTouch:mainfrom
JezaChen:fix/_INPUTUnion-not-defined
Mar 16, 2026
Merged

fix: import _INPUTUnion from enums to fix NameError#108
Jeomon merged 1 commit intoCursorTouch:mainfrom
JezaChen:fix/_INPUTUnion-not-defined

Conversation

@JezaChen
Copy link
Contributor

When testing the Type tool discussed in #106 , I ran into an issue:

Error calling tool 'Type': name '_INPUTUnion' is not defined

The reason is that from .enums import * does not import names starting with an underscore, so _INPUTUnion is not available in scope. I’ve opened this small PR to fix this by explicitly importing it:

from .enums import _INPUTUnion

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a runtime NameError encountered when using the Type tool by ensuring _INPUTUnion is available in uia.core despite the existing wildcard import behavior.

Changes:

  • Explicitly imports _INPUTUnion from uia.enums in uia.core to avoid it being skipped by from .enums import *.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

ProcessTime() # need to call it once if python version <= 3.6
TreeNode = Any
from .enums import * # noqa: E402
from .enums import _INPUTUnion
@Jeomon Jeomon merged commit 8a45d9f into CursorTouch:main Mar 16, 2026
3 of 4 checks passed
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.

3 participants