Update deprecated Python 3.8 typing (#13971)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import asyncio
|
||||
import os
|
||||
import socket
|
||||
from typing import AsyncIterator, Tuple
|
||||
from collections.abc import AsyncIterator
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@@ -33,7 +33,7 @@ async def test_merge_async_iterators():
|
||||
iterators = [mock_async_iterator(i) for i in range(3)]
|
||||
merged_iterator = merge_async_iterators(*iterators)
|
||||
|
||||
async def stream_output(generator: AsyncIterator[Tuple[int, str]]):
|
||||
async def stream_output(generator: AsyncIterator[tuple[int, str]]):
|
||||
async for idx, output in generator:
|
||||
print(f"idx: {idx}, output: {output}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user