Skip to content

Commit

Permalink
fix: using Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aliev committed Jun 18, 2024
1 parent 43b0cf5 commit c77e65c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aiostd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import asyncio
import os
from typing import IO
from typing import IO, Optional


async def open_io_stream_reader(
reader: IO,
loop: asyncio.AbstractEventLoop | None = None,
loop: Optional[asyncio.AbstractEventLoop] = None,
) -> asyncio.StreamReader:
"""
Asynchronously opens a stream reader for the given IO object.
Expand Down Expand Up @@ -34,7 +34,7 @@ async def open_io_stream_reader(

async def open_io_stream_writer(
writer: IO,
loop: asyncio.AbstractEventLoop | None = None,
loop: Optional[asyncio.AbstractEventLoop] = None,
) -> asyncio.StreamWriter:
"""
Asynchronously opens a stream writer for the given IO object.
Expand Down Expand Up @@ -66,7 +66,7 @@ async def open_io_stream_writer(
async def open_io_stream(
reader: IO,
writer: IO,
loop: asyncio.AbstractEventLoop | None = None,
loop: Optional[asyncio.AbstractEventLoop] = None,
) -> tuple[asyncio.StreamReader, asyncio.StreamWriter]:
"""
Asynchronously opens both stream reader and writer for the given IO objects.
Expand Down

0 comments on commit c77e65c

Please sign in to comment.