refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -55,7 +55,7 @@ def fetch_pages(endpoint: str, **params: str) -> list[object]:
|
||||
while True:
|
||||
query = urlencode({**params, "per_page": PER_PAGE, "page": page})
|
||||
url = f"https://api.github.com/repos/{REPOSITORY}/{endpoint}?{query}"
|
||||
with urlopen(Request(url, headers=headers), timeout=30) as response: # noqa: S310
|
||||
with urlopen(Request(url, headers=headers), timeout=30) as response:
|
||||
batch = json.load(response)
|
||||
if not isinstance(batch, list):
|
||||
raise ValueError("Expected a GitHub API list response")
|
||||
@@ -68,7 +68,6 @@ def fetch_pages(endpoint: str, **params: str) -> list[object]:
|
||||
|
||||
|
||||
def fetch_contributors(previous_wall: str = "") -> list[Contributor]:
|
||||
# Shapes follow the GitHub contributors and commits REST response schemas.
|
||||
entries = cast(list[Contributor], fetch_pages("contributors", anon="1"))
|
||||
contributors = {
|
||||
c["login"].lower(): c for c in entries
|
||||
|
||||
Reference in new issue
Block a user