Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit cc19089

Browse files
committed
fix mypy errors
1 parent 9c1a621 commit cc19089

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

tests/asyncio/test_bidi_async.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
from unittest import mock
1919

20-
try:
21-
from unittest.mock import AsyncMock
22-
except ImportError: # pragma: NO COVER
23-
from asyncmock import AsyncMock
20+
from unittest.mock import AsyncMock
2421

2522
import pytest
2623

@@ -31,18 +28,12 @@
3128

3229
from google.api_core import bidi_async
3330

34-
try:
35-
aiter
36-
except NameError:
31+
32+
if sys.version < (3, 10): # type: ignore[operator]
3733

3834
def aiter(obj):
3935
return obj.__aiter__()
4036

41-
42-
try:
43-
anext
44-
except NameError:
45-
4637
async def anext(obj):
4738
return await obj.__anext__()
4839

@@ -193,7 +184,7 @@ def test_done_callbacks(self):
193184

194185
@pytest.mark.asyncio
195186
@pytest.mark.skipif(
196-
sys.version_info < (3, 8),
187+
sys.version_info < (3, 8), # type: ignore[operator]
197188
reason="Python 3.8 below doesnt provide support for assert_awaited_once",
198189
)
199190
async def test_metadata(self):

0 commit comments

Comments
 (0)