fix: import _INPUTUnion from enums to fix NameError#108
Merged
Jeomon merged 1 commit intoCursorTouch:mainfrom Mar 16, 2026
Merged
fix: import _INPUTUnion from enums to fix NameError#108Jeomon merged 1 commit intoCursorTouch:mainfrom
Jeomon merged 1 commit intoCursorTouch:mainfrom
Conversation
There was a problem hiding this comment.
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
_INPUTUnionfromuia.enumsinuia.coreto avoid it being skipped byfrom .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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When testing the
Typetool discussed in #106 , I ran into an issue:Error calling tool 'Type': name '_INPUTUnion' is not definedThe reason is that
from .enums import *does not import names starting with an underscore, so_INPUTUnionis not available in scope. I’ve opened this small PR to fix this by explicitly importing it:from .enums import _INPUTUnion