style: Format Python code with linter

This commit is contained in:
Paul Gauthier (aider) 2024-11-08 09:11:24 -08:00
parent 434dc27557
commit e578655653

View file

@ -167,10 +167,12 @@ def handle_stale_issues(all_issues, auto_yes):
for issue in all_issues: for issue in all_issues:
# Skip if not open, not a question, already stale, or has been reopened # Skip if not open, not a question, already stale, or has been reopened
if (issue["state"] != "open" or if (
"question" not in [label["name"] for label in issue["labels"]] or issue["state"] != "open"
"stale" in [label["name"] for label in issue["labels"]] or or "question" not in [label["name"] for label in issue["labels"]]
has_been_reopened(issue["number"])): or "stale" in [label["name"] for label in issue["labels"]]
or has_been_reopened(issue["number"])
):
continue continue
# Get latest activity timestamp from issue or its comments # Get latest activity timestamp from issue or its comments
@ -194,7 +196,9 @@ def handle_stale_issues(all_issues, auto_yes):
response.raise_for_status() response.raise_for_status()
# Add comment # Add comment
comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments" comment_url = (
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
)
response = requests.post(comment_url, headers=headers, json={"body": STALE_COMMENT}) response = requests.post(comment_url, headers=headers, json={"body": STALE_COMMENT})
response.raise_for_status() response.raise_for_status()