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

update pre-commit #1163

Merged
merged 1 commit into from
Nov 11, 2024
Merged

update pre-commit #1163

merged 1 commit into from
Nov 11, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Nov 11, 2024

Important

Update pre-commit versions and replace type() with isinstance() for type checking in handler.py.

  • Pre-commit Configuration:
    • Update pre-commit-hooks to v5.0.0, ruff-pre-commit to v0.7.3, and mirrors-mypy to v1.13.0 in .pre-commit-config.yaml.
  • Code Fixes:
    • Replace type() with isinstance() for type checking in handle_action() and fc_func() in handler.py.

This description was created by Ellipsis for 9cd8605. 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 010ed96 in 1 minute and 0 seconds

More details
  • Looked at 54 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/actions/handler.py:1135
  • Draft comment:
    The condition if isinstance(sibling_action_result, ActionSuccess): should be if not isinstance(sibling_action_result, ActionSuccess): to match the original logic of checking for non-successful actions.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_4rAAHGq4VXf0Y1ds


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.

@@ -248,7 +248,7 @@ async def handle_action(
handler = ActionHandler._handled_action_types[action.action_type]
results = await handler(action, page, scraped_page, task, step)
actions_result.extend(results)
if not results or type(actions_result[-1]) != ActionSuccess:
if not results or isinstance(actions_result[-1], ActionSuccess):
Copy link
Contributor

Choose a reason for hiding this comment

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

The condition if not results or isinstance(actions_result[-1], ActionSuccess): seems incorrect. It should be if not results or not isinstance(actions_result[-1], ActionSuccess): to match the original logic of checking for non-successful actions.

Suggested change
if not results or isinstance(actions_result[-1], ActionSuccess):
if not results or not isinstance(actions_result[-1], ActionSuccess):

@wintonzheng wintonzheng force-pushed the shu/pre-commit-update branch from 010ed96 to 9cd8605 Compare November 11, 2024 09:05
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.

👍 Looks good to me! Incremental review on 9cd8605 in 18 seconds

More details
  • Looked at 54 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/actions/handler.py:251
  • Draft comment:
    The use of isinstance() for type checking is a good practice. It is more reliable and readable than using type(). This change is correctly implemented here and in fc_func().
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The use of isinstance() is a good practice for type checking, as it is more reliable and readable than using type(). The changes made in the PR are correct and align with best practices.

Workflow ID: wflow_8NuzIITbYeZjcntf


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@wintonzheng wintonzheng merged commit 9130640 into main Nov 11, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/pre-commit-update branch November 11, 2024 09:07
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