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

[Internal] Enable ui_widget type as internal component input type #28675

Merged
merged 6 commits into from
Feb 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix code style
  • Loading branch information
lalala123123 committed Feb 8, 2023
commit 3e6854ad1a99f7b35cdabf067bf63dc72c419b88
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def _is_primitive_type(self):
return True
return super()._is_primitive_type

def _convert_ui_widget_type(self, type):
def _convert_ui_widget_type(self, input_type):
try:
UIWidgetTypeEnum(type)
return "string"
UIWidgetTypeEnum(input_type)
return ComponentParameterTypes.STRING
except ValueError:
return type
return input_type

def _simple_parse(self, value, _type=None):
# simple parse is used to parse min, max & optional only, so we don't need to handle enum
Expand Down