mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/149257 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
811f587d86
commit
a0ac63cbd9
7
.github/scripts/trymerge.py
vendored
7
.github/scripts/trymerge.py
vendored
@ -819,10 +819,9 @@ class GitHubPR:
|
||||
cursor=info["reviews"]["pageInfo"]["startCursor"],
|
||||
)
|
||||
info = rc["data"]["repository"]["pullRequest"]
|
||||
reviews = {}
|
||||
for author, state in self._reviews:
|
||||
if state != "COMMENTED":
|
||||
reviews[author] = state
|
||||
reviews = {
|
||||
author: state for author, state in self._reviews if state != "COMMENTED"
|
||||
}
|
||||
return list(reviews.items())
|
||||
|
||||
def get_approved_by(self) -> list[str]:
|
||||
|
Reference in New Issue
Block a user