chore: cleanup pycodestyle E rules (#8269)
This commit is contained in:
@@ -71,7 +71,7 @@ class BingSearchTool(BuiltinTool):
|
||||
text = ""
|
||||
if search_results:
|
||||
for i, result in enumerate(search_results):
|
||||
text += f'{i+1}: {result.get("name", "")} - {result.get("snippet", "")}\n'
|
||||
text += f'{i + 1}: {result.get("name", "")} - {result.get("snippet", "")}\n'
|
||||
|
||||
if computation and "expression" in computation and "value" in computation:
|
||||
text += "\nComputation:\n"
|
||||
|
@@ -83,5 +83,5 @@ class DIDApp:
|
||||
if status["status"] == "done":
|
||||
return status
|
||||
elif status["status"] == "error" or status["status"] == "rejected":
|
||||
raise HTTPError(f'Talks {id} failed: {status["status"]} {status.get("error",{}).get("description")}')
|
||||
raise HTTPError(f'Talks {id} failed: {status["status"]} {status.get("error", {}).get("description")}')
|
||||
time.sleep(poll_interval)
|
||||
|
@@ -142,7 +142,7 @@ class ListWorksheetRecordsTool(BuiltinTool):
|
||||
for control in controls:
|
||||
control_type_id = self.get_real_type_id(control)
|
||||
if (control_type_id in self._get_ignore_types()) or (
|
||||
allow_fields and not control["controlId"] in allow_fields
|
||||
allow_fields and control["controlId"] not in allow_fields
|
||||
):
|
||||
continue
|
||||
else:
|
||||
|
@@ -67,7 +67,7 @@ class ListWorksheetsTool(BuiltinTool):
|
||||
items = []
|
||||
tables = ""
|
||||
for item in section.get("items", []):
|
||||
if item.get("type") == 0 and (not "notes" in item or item.get("notes") != "NO"):
|
||||
if item.get("type") == 0 and ("notes" not in item or item.get("notes") != "NO"):
|
||||
if type == "json":
|
||||
filtered_item = {"id": item["id"], "name": item["name"], "notes": item.get("notes", "")}
|
||||
items.append(filtered_item)
|
||||
|
Reference in New Issue
Block a user