Skip to content

Commit 8150a6d

Browse files
Auto-generated API code
1 parent 25d4c65 commit 8150a6d

File tree

8 files changed

+0
-18
lines changed

8 files changed

+0
-18
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ def __init__(
311311
sniff_callback = default_sniff_callback
312312

313313
if _transport is None:
314-
315314
requests_session_auth = None
316315
if http_auth is not None and http_auth is not DEFAULT:
317316
if is_requests_http_auth(http_auth):

elasticsearch/_async/client/_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def resolve_auth_headers(
7171
basic_auth: Union[DefaultType, None, Tuple[str, str], str] = DEFAULT,
7272
bearer_auth: Union[DefaultType, None, str] = DEFAULT,
7373
) -> HttpHeaders:
74-
7574
if headers is None:
7675
headers = HttpHeaders()
7776
elif not isinstance(headers, HttpHeaders):

elasticsearch/_async/helpers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ async def async_streaming_bulk(
176176
*args: Any,
177177
**kwargs: Any,
178178
) -> AsyncIterable[Tuple[bool, Dict[str, Any]]]:
179-
180179
"""
181180
Streaming bulk consumes actions from the iterable passed in and yields
182181
results per action. For non-streaming usecases use
@@ -230,7 +229,6 @@ async def map_actions() -> AsyncIterable[_TYPE_BULK_ACTION_HEADER_AND_BODY]:
230229
async for bulk_data, bulk_actions in _chunk_actions(
231230
map_actions(), chunk_size, max_chunk_bytes, serializer
232231
):
233-
234232
for attempt in range(max_retries + 1):
235233
to_retry: List[bytes] = []
236234
to_retry_data: List[
@@ -264,7 +262,6 @@ async def map_actions() -> AsyncIterable[_TYPE_BULK_ACTION_HEADER_AND_BODY]:
264262
**kwargs,
265263
),
266264
):
267-
268265
if not ok:
269266
action, info = info.popitem()
270267
# retry if retries enabled, we get 429, and we are not
@@ -509,7 +506,6 @@ async def async_reindex(
509506
scan_kwargs: MutableMapping[str, Any] = {},
510507
bulk_kwargs: MutableMapping[str, Any] = {},
511508
) -> Tuple[int, Union[int, List[Any]]]:
512-
513509
"""
514510
Reindex all documents from one index that satisfy a given query
515511
to another, potentially (if `target_client` is specified) on a different cluster.

elasticsearch/_sync/client/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ def __init__(
311311
sniff_callback = default_sniff_callback
312312

313313
if _transport is None:
314-
315314
requests_session_auth = None
316315
if http_auth is not None and http_auth is not DEFAULT:
317316
if is_requests_http_auth(http_auth):

elasticsearch/_sync/client/_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def resolve_auth_headers(
7171
basic_auth: Union[DefaultType, None, Tuple[str, str], str] = DEFAULT,
7272
bearer_auth: Union[DefaultType, None, str] = DEFAULT,
7373
) -> HttpHeaders:
74-
7574
if headers is None:
7675
headers = HttpHeaders()
7776
elif not isinstance(headers, HttpHeaders):

elasticsearch/helpers/actions.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ def streaming_bulk(
373373
*args: Any,
374374
**kwargs: Any,
375375
) -> Iterable[Tuple[bool, Dict[str, Any]]]:
376-
377376
"""
378377
Streaming bulk consumes actions from the iterable passed in and yields
379378
results per action. For non-streaming usecases use
@@ -422,7 +421,6 @@ def streaming_bulk(
422421
for bulk_data, bulk_actions in _chunk_actions(
423422
map(expand_action_callback, actions), chunk_size, max_chunk_bytes, serializer
424423
):
425-
426424
for attempt in range(max_retries + 1):
427425
to_retry: List[bytes] = []
428426
to_retry_data: List[
@@ -448,7 +446,6 @@ def streaming_bulk(
448446
**kwargs,
449447
),
450448
):
451-
452449
if not ok:
453450
action, info = info.popitem()
454451
# retry if retries enabled, we get 429, and we are not
@@ -770,7 +767,6 @@ def reindex(
770767
scan_kwargs: MutableMapping[str, Any] = {},
771768
bulk_kwargs: MutableMapping[str, Any] = {},
772769
) -> Tuple[int, Union[int, List[Dict[str, Any]]]]:
773-
774770
"""
775771
Reindex all documents from one index that satisfy a given query
776772
to another, potentially (if `target_client` is specified) on a different cluster.

test_elasticsearch/test_async/test_server/test_helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ async def test_initial_search_error(self, async_client, scan_teardown):
559559
),
560560
):
561561
with patch.object(async_client, "scroll", MockScroll()):
562-
563562
data = [
564563
x
565564
async for x in helpers.async_scan(
@@ -586,7 +585,6 @@ async def test_initial_search_error(self, async_client, scan_teardown):
586585
),
587586
):
588587
with patch.object(async_client, "scroll", MockScroll()) as mock_scroll:
589-
590588
with pytest.raises(ScanError):
591589
data = [
592590
x

test_elasticsearch/test_server/test_helpers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ def test_initial_search_error(sync_client):
528528
with patch.object(sync_client, "scroll") as scroll_mock, patch.object(
529529
sync_client, "clear_scroll"
530530
) as clear_scroll_mock:
531-
532531
scroll_mock.side_effect = mock_scroll_responses
533532
data = list(
534533
helpers.scan(
@@ -549,7 +548,6 @@ def test_initial_search_error(sync_client):
549548
with patch.object(sync_client, "scroll") as scroll_mock, patch.object(
550549
sync_client, "clear_scroll"
551550
) as clear_scroll_mock:
552-
553551
scroll_mock.side_effect = mock_scroll_responses
554552
with pytest.raises(ScanError):
555553
data = list(
@@ -644,7 +642,6 @@ def test_scan_auth_kwargs_forwarded(sync_client, kwargs):
644642

645643

646644
def test_scan_auth_kwargs_favor_scroll_kwargs_option(sync_client):
647-
648645
with patch.object(
649646
sync_client, "options", return_value=sync_client
650647
) as options_mock, patch.object(
@@ -672,7 +669,6 @@ def test_scan_auth_kwargs_favor_scroll_kwargs_option(sync_client):
672669
) as scroll_mock, patch.object(
673670
sync_client, "clear_scroll", return_value=ObjectApiResponse(raw={}, meta=None)
674671
):
675-
676672
data = list(
677673
helpers.scan(
678674
sync_client,

0 commit comments

Comments
 (0)