Skip to content

Commit

Permalink
LNT: Run pre-commit. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Taher Chegini committed Feb 9, 2024
1 parent 9568ae1 commit 44f7fa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion async_retriever/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def stream_session(
) -> None:
"""Stream the response to a file."""
async with session(url, **s_kwds) as response:
if response.status != 200:
if response.status != 200: # noqa: PLR2004
raise ServiceError(await response.text(), str(response.url))
with filepath.open("wb") as fd:
if chunk_size is None:
Expand Down
8 changes: 4 additions & 4 deletions async_retriever/async_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ async def async_session_with_cache(
utils.retriever(uid, url, kwds, request_func, read, r_kwds, raise_status)
for uid, url, kwds in url_kwds
)
return await asyncio.gather(*tasks) # pyright: ignore[reportGeneralTypeIssues]
return await asyncio.gather(*tasks) # pyright: ignore[reportReturnType]


async def async_session_without_cache(
Expand Down Expand Up @@ -276,7 +276,7 @@ async def async_session_without_cache(
utils.retriever(uid, url, kwds, request_func, read, r_kwds, raise_status)
for uid, url, kwds in url_kwds
)
return await asyncio.gather(*tasks) # pyright: ignore[reportGeneralTypeIssues]
return await asyncio.gather(*tasks) # pyright: ignore[reportReturnType]


@overload
Expand Down Expand Up @@ -391,7 +391,7 @@ def retrieve(
... ]
... )
>>> resp = ar.retrieve(urls, "text", request_kwds=kwds)
>>> resp[0].split('\n')[-2].split('\t')[1]
>>> resp[0].split("\n")[-2].split("\t")[1]
'01646500'
"""
inp = BaseRetriever(
Expand Down Expand Up @@ -496,7 +496,7 @@ def retrieve_text(
... ]
... )
>>> resp = ar.retrieve_text(urls, kwds)
>>> resp[0].split('\n')[-2].split('\t')[1]
>>> resp[0].split("\n")[-2].split("\t")[1]
'01646500'
"""
return retrieve(
Expand Down

0 comments on commit 44f7fa4

Please sign in to comment.