update pre-commit (#1163)

This commit is contained in:
Shuchang Zheng
2024-11-11 01:07:01 -08:00
committed by GitHub
parent 28353aeef2
commit 9130640fc2
2 changed files with 5 additions and 5 deletions

View File

@@ -248,7 +248,7 @@ class ActionHandler:
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 not isinstance(actions_result[-1], ActionSuccess):
return actions_result
# do the teardown
@@ -1131,7 +1131,7 @@ async def chain_click(
)
sibling_action_result = await click_sibling_of_input(locator, timeout=timeout)
action_results.append(sibling_action_result)
if type(sibling_action_result) == ActionSuccess:
if isinstance(sibling_action_result, ActionSuccess):
return action_results
try: