Fix unused Python variables outside torch/ and test/ (#136359)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/136359
Approved by: https://github.com/albanD
This commit is contained in:
Tom Ritchford
2024-12-11 14:00:52 +00:00
committed by PyTorch MergeBot
parent 241bf047b3
commit 498a7808ff
49 changed files with 39 additions and 86 deletions

View File

@ -1747,7 +1747,7 @@ def get_classifications(
try:
print(f"From Dr.CI checkrun summary: {drci_summary}")
drci_classifications = json.loads(str(drci_summary))
except json.JSONDecodeError as error:
except json.JSONDecodeError:
warn("Invalid Dr.CI checkrun summary")
drci_classifications = {}
@ -1918,7 +1918,6 @@ def do_revert_prs(
dry_run: bool = False,
) -> None:
# Prepare and push revert commits
commit_shas: List[str] = []
for commit_sha, pr in shas_and_prs:
revert_msg = f"\nReverted {pr.get_pr_url()} on behalf of {prefix_with_github_url(author_login)}"
revert_msg += extra_msg