Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca78d80

Browse filesBrowse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 1c89081 commit ca78d80
Copy full SHA for ca78d80

File tree

Expand file treeCollapse file tree

1 file changed

+4
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-13
lines changed

‎scripts/stubsabot.py

Copy file name to clipboardExpand all lines: scripts/stubsabot.py
+4-13Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ async def fetch_pypi_info(distribution: str, session: aiohttp.ClientSession) ->
5252
j = await response.json()
5353
version = j["info"]["version"]
5454
date = datetime.datetime.fromisoformat(j["releases"][version][0]["upload_time"])
55-
return PypiInfo(
56-
distribution=distribution, version=packaging.version.Version(version), upload_date=date
57-
)
55+
return PypiInfo(distribution=distribution, version=packaging.version.Version(version), upload_date=date)
5856

5957

6058
@dataclass
@@ -72,9 +70,7 @@ class NoUpdate:
7270

7371

7472
def _check_spec(updated_spec: str, version: packaging.version.Version) -> str:
75-
assert version in packaging.specifiers.SpecifierSet(
76-
"==" + updated_spec
77-
), f"{version} not in {updated_spec}"
73+
assert version in packaging.specifiers.SpecifierSet("==" + updated_spec), f"{version} not in {updated_spec}"
7874
return updated_spec
7975

8076

@@ -120,9 +116,7 @@ def normalize(name: str) -> str:
120116
FORK_OWNER = "hauntsaninja"
121117

122118

123-
async def suggest_typeshed_update(
124-
update: Update, session: aiohttp.ClientSession, dry_run: bool
125-
) -> None:
119+
async def suggest_typeshed_update(update: Update, session: aiohttp.ClientSession, dry_run: bool) -> None:
126120
title = f"[stubsabot] Bump {update.distribution} to {update.new_version_spec}"
127121

128122
# lock should be unnecessary, but can't hurt to enforce mutual exclusion
@@ -169,10 +163,7 @@ async def main() -> None:
169163
try:
170164
conn = aiohttp.TCPConnector(limit_per_host=10)
171165
async with aiohttp.ClientSession(connector=conn) as session:
172-
tasks = [
173-
asyncio.create_task(determine_action(stubs_path, session))
174-
for stubs_path in Path("stubs").iterdir()
175-
]
166+
tasks = [asyncio.create_task(determine_action(stubs_path, session)) for stubs_path in Path("stubs").iterdir()]
176167
for task in asyncio.as_completed(tasks):
177168
update = await task
178169
if isinstance(update, NoUpdate):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.