Skip to content

Commit 2c36d80

Browse files
committed
BinaryIO -> IO
1 parent f9c01a9 commit 2c36d80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

asyncio-walkthrough/areq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import logging
88
import re
99
import sys
10-
from typing import BinaryIO
10+
from typing import IO
1111
import urllib.error
1212
import urllib.parse
1313

@@ -83,7 +83,7 @@ async def parse(url: str, session: ClientSession, **kwargs) -> set:
8383
return found
8484

8585

86-
async def write_one(file: BinaryIO, url: str, **kwargs) -> None:
86+
async def write_one(file: IO, url: str, **kwargs) -> None:
8787
"""Write the found HREFs from `url` to `file`."""
8888
res = await parse(url=url, **kwargs)
8989
if not res:
@@ -94,7 +94,7 @@ async def write_one(file: BinaryIO, url: str, **kwargs) -> None:
9494
logger.info("Wrote results for source URL: %s", url)
9595

9696

97-
async def bulk_crawl_and_write(file: BinaryIO, urls: set, **kwargs) -> None:
97+
async def bulk_crawl_and_write(file: IO, urls: set, **kwargs) -> None:
9898
"""Crawl & write concurrently to `file` for multiple `urls`."""
9999
async with ClientSession() as session:
100100
tasks = []

0 commit comments

Comments
 (0)