Skip to content

Commit

Permalink
stop using f-strings when there are no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed May 18, 2024
1 parent 32c95f4 commit 68346f2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/seer/automation/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run(self, prompt: str):
)

logger.debug(f"----[{self.name}] Running Agent----")
logger.debug(f"Previous messages: ")
logger.debug("Previous messages: ")
for message in self.memory:
logger.debug(f"{message.role}: {message.content}")

Expand Down
2 changes: 1 addition & 1 deletion src/seer/automation/autofix/autofix_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def commit_changes(self, repo_id: int | None = None):
)

if branch_ref is None:
autofix_logger.warning(f"Failed to create branch from changes")
autofix_logger.warning("Failed to create branch from changes")
return None

pr_title = f"""🤖 {change_state.title}"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def invoke(self, request: ProblemDiscoveryRequest) -> ProblemDiscoveryOutput | N
cur.usage += usage

if data is None:
autofix_logger.warning(f"Problem discovery agent did not return a valid response")
autofix_logger.warning("Problem discovery agent did not return a valid response")
return None

return ProblemDiscoveryOutput.model_validate(data)
2 changes: 1 addition & 1 deletion src/seer/json_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def decorator(implementation: _F) -> _F:
assert issubclass(response_annotation, BaseModel)
except (KeyError, IndexError, AssertionError):
raise ValueError(
f"json_api implementations must have one non keyword, argument, annotated with a BaseModel and a BaseModel return value"
"json_api implementations must have one non keyword, argument, annotated with a BaseModel and a BaseModel return value"
)

def wrapper() -> Any:
Expand Down
4 changes: 2 additions & 2 deletions src/seer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ async def select_from_db(self) -> None:
)
if result is not None and result[0]:
for item in result[0]:
logger.info(f"Picked up process request, running")
logger.info("Picked up process request, running")
await self.run_or_end(self.queue.put(item))
logger.info(f"Process request completed successfully")
logger.info("Process request completed successfully")
if self.end_event.is_set():
break
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def new_side_effect(self):
await asyncio.sleep(0.1)
if self.side_effect_calls:
return self.side_effect_calls
raise ValueError(f"side effect of invoke was not invoked for 2 seconds")
raise ValueError("side effect of invoke was not invoked for 2 seconds")


@pytest.mark.asyncio
Expand Down

0 comments on commit 68346f2

Please sign in to comment.