fetch-contributor-data: Modernize set literal syntax.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-09-21 21:09:46 -07:00 committed by Anders Kaseorg
parent 949bfac40c
commit 7d515ac510
1 changed files with 6 additions and 8 deletions

View File

@ -71,14 +71,12 @@ def fetch_contributors(repo_name: str, max_retries: int) -> List[Contributor]:
retry = Retry( retry = Retry(
total=max_retries, total=max_retries,
backoff_factor=2.0, backoff_factor=2.0,
status_forcelist=set( status_forcelist={
[ 403, # Github does unauth rate-limiting via 403's
403, # Github does unauth rate-limiting via 403's 429, # The formal rate-limiting response code
429, # The formal rate-limiting response code 502, # Bad gateway
502, # Bad gateway 503, # Service unavailable
503, # Service unavailable },
]
),
) )
session = GithubSession(max_retries=retry) session = GithubSession(max_retries=retry)
while True: while True: