Skip to content

Commit e44d3ca

Browse files
linter fixes
1 parent 998a7b2 commit e44d3ca

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

elasticsearch/_async/helpers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ async def _chunk_actions(
9393
chunk_size=chunk_size, max_chunk_bytes=max_chunk_bytes, serializer=serializer
9494
)
9595

96+
action: _TYPE_BULK_ACTION_WITH_META
97+
data: _TYPE_BULK_ACTION_BODY
9698
if not flush_after_seconds:
9799
async for action, data in actions:
98100
ret = chunker.feed(action, data)
@@ -115,8 +117,8 @@ async def get_items() -> None:
115117

116118
timeout: Optional[float] = flush_after_seconds
117119
while True:
118-
action: _TYPE_BULK_ACTION_WITH_META = {}
119-
data: _TYPE_BULK_ACTION_BODY = None
120+
action = {}
121+
data = None
120122
with move_on_after(timeout) as scope:
121123
action, data = await receiver.receive()
122124
timeout = flush_after_seconds

elasticsearch/compat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import asyncio
1918
import inspect
2019
import os
2120
import sys
22-
from contextlib import asynccontextmanager, contextmanager
21+
from contextlib import contextmanager
2322
from pathlib import Path
2423
from threading import Thread
25-
from typing import Any, AsyncIterator, Callable, Coroutine, Iterator, Tuple, Type, Union
24+
from typing import Any, Callable, Iterator, Tuple, Type, Union
2625

2726
string_types: Tuple[Type[str], Type[bytes]] = (str, bytes)
2827

0 commit comments

Comments
 (0)