Skip to content

Commit

Permalink
tests: more formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseInfinity committed Oct 25, 2023
1 parent 2335525 commit 7529654
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions chromegpt/tools/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def google_search(self, query: str) -> str:
results = self._get_google_search_results()
return (
"Which url would you like to goto? Provide the full url starting with http"
" or https to goto: " + json.dumps(results)
" or https to goto: "
+ json.dumps(results)
)

def _get_google_search_results(self) -> List[Dict[str, Any]]:
Expand Down Expand Up @@ -323,10 +324,16 @@ def fill_out_form(self, form_input: Optional[str] = None, **kwargs: Any) -> str:
except StaleElementReferenceException:
retries += 1
if retries == MAX_RETRIES:
return f"Failed to fill out form input {key} after {MAX_RETRIES} retries."
return (
f"Failed to fill out form input {key} after"
f" {MAX_RETRIES} retries."
)
continue
except WebDriverException as e:
return f"Error filling out form with input {form_input}, message: {e.msg}"
return (
f"Error filling out form with input {form_input}, message:"
f" {e.msg}"
)

if not filled_element:
return (
Expand Down

0 comments on commit 7529654

Please sign in to comment.