@@ -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
7472def _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:
120116FORK_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