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

cast action type #1233

Merged
merged 1 commit into from
Nov 21, 2024
Merged

cast action type #1233

merged 1 commit into from
Nov 21, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 21, 2024

Important

In service.py, action_type is now determined using ActionType enum lookup instead of string manipulation.

  • Behavior:
    • In block_yaml_to_block function, action_type is now determined using ActionType[action_type.upper()] instead of action_type.lower().
  • Misc:
    • This change ensures action_type is always a valid ActionType enum value.

This description was created by Ellipsis for f90e050. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to f90e050 in 48 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_doLgkpm3Wl7qXz6S


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -1381,7 +1381,7 @@ async def block_yaml_to_block(
)

action_type: str = json_response.get("action_type") or ""
action_type = action_type.lower()
action_type = ActionType[action_type.upper()]
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider handling potential KeyError when accessing ActionType[action_type.upper()] to ensure robustness.

@LawyZheng LawyZheng merged commit df47d43 into main Nov 21, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/action-type-cast branch November 21, 2024 09:59
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.

1 participant