@@ -52,9 +52,7 @@ async def fetch_pypi_info(distribution: str, session: aiohttp.ClientSession) ->
52
52
j = await response .json ()
53
53
version = j ["info" ]["version" ]
54
54
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 )
58
56
59
57
60
58
@dataclass
@@ -72,9 +70,7 @@ class NoUpdate:
72
70
73
71
74
72
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 } "
78
74
return updated_spec
79
75
80
76
@@ -120,9 +116,7 @@ def normalize(name: str) -> str:
120
116
FORK_OWNER = "hauntsaninja"
121
117
122
118
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 :
126
120
title = f"[stubsabot] Bump { update .distribution } to { update .new_version_spec } "
127
121
128
122
# lock should be unnecessary, but can't hurt to enforce mutual exclusion
@@ -169,10 +163,7 @@ async def main() -> None:
169
163
try :
170
164
conn = aiohttp .TCPConnector (limit_per_host = 10 )
171
165
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 ()]
176
167
for task in asyncio .as_completed (tasks ):
177
168
update = await task
178
169
if isinstance (update , NoUpdate ):
0 commit comments