Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Jul 18, 2024
1 parent 8058c54 commit 9b89a85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/actions/summarizer/gemini_summarize_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def log_prompt_to_bigquery(
pr_number: int,
commit_id: str,
input_prompt: str,
model_output: str,
model_output: Optional[str],
raw_response: GenerationResponse,
) -> Sequence[dict]:
"""Log Gemini prompt input/output to BigQuery."""
Expand Down Expand Up @@ -110,7 +110,7 @@ def summarize_pr_gemini(
response = model.generate_content(input_prompt)
try:
output_text = response.text.replace("## Pull Request Summary", "")
except Exception:
except Exception: # pylint: disable=broad-exception-caught
output_text = None

return (
Expand Down Expand Up @@ -162,7 +162,9 @@ def main() -> None:
pr_number, commit_id, input_prompt, summary, raw_response
)
print(bq_output)
add_pr_comment(pr, summary, commit_id)

if summary:
add_pr_comment(pr, summary, commit_id)


if __name__ == "__main__":
Expand Down

0 comments on commit 9b89a85

Please sign in to comment.