[7.x] Sort imports with isort and regenerate APIs

This commit is contained in:
Seth Michael Larson
2021-01-13 14:21:04 -06:00
committed by GitHub
parent e0e54a1128
commit a728aaa491
195 changed files with 1010 additions and 816 deletions
+12 -4
View File
@@ -16,10 +16,18 @@
# under the License.
import sys
from .actions import (
_chunk_actions,
_process_bulk_chunk,
bulk,
expand_action,
parallel_bulk,
reindex,
scan,
streaming_bulk,
)
from .errors import BulkIndexError, ScanError
from .actions import expand_action, streaming_bulk, bulk, parallel_bulk
from .actions import scan, reindex
from .actions import _chunk_actions, _process_bulk_chunk
__all__ = [
"BulkIndexError",
@@ -41,9 +49,9 @@ try:
raise ImportError
from .._async.helpers import (
async_scan,
async_bulk,
async_reindex,
async_scan,
async_streaming_bulk,
)
+15 -17
View File
@@ -16,28 +16,26 @@
# under the License.
import sys
from .errors import BulkIndexError as BulkIndexError, ScanError as ScanError
from .actions import (
expand_action as expand_action,
streaming_bulk as streaming_bulk,
bulk as bulk,
parallel_bulk as parallel_bulk,
scan as scan,
reindex as reindex,
_chunk_actions as _chunk_actions,
_process_bulk_chunk as _process_bulk_chunk,
)
from .actions import _chunk_actions as _chunk_actions
from .actions import _process_bulk_chunk as _process_bulk_chunk
from .actions import bulk as bulk
from .actions import expand_action as expand_action
from .actions import parallel_bulk as parallel_bulk
from .actions import reindex as reindex
from .actions import scan as scan
from .actions import streaming_bulk as streaming_bulk
from .errors import BulkIndexError as BulkIndexError
from .errors import ScanError as ScanError
try:
# Asyncio only supported on Python 3.6+
if sys.version_info < (3, 6):
raise ImportError
from .._async.helpers import (
async_scan as async_scan,
async_bulk as async_bulk,
async_reindex as async_reindex,
async_streaming_bulk as async_streaming_bulk,
)
from .._async.helpers import async_bulk as async_bulk
from .._async.helpers import async_reindex as async_reindex
from .._async.helpers import async_scan as async_scan
from .._async.helpers import async_streaming_bulk as async_streaming_bulk
except (ImportError, SyntaxError):
pass
+5 -8
View File
@@ -15,16 +15,13 @@
# specific language governing permissions and limitations
# under the License.
from operator import methodcaller
import time
from ..exceptions import TransportError
from ..compat import map, string_types, Queue, Mapping
from .errors import ScanError, BulkIndexError
import logging
import time
from operator import methodcaller
from ..compat import Mapping, Queue, map, string_types
from ..exceptions import TransportError
from .errors import BulkIndexError, ScanError
logger = logging.getLogger("elasticsearch.helpers")
+15 -14
View File
@@ -15,21 +15,22 @@
# specific language governing permissions and limitations
# under the License.
from typing import (
Generator,
Optional,
Union,
Any,
Mapping,
Tuple,
Iterable,
AsyncIterable,
List,
Collection,
Callable,
Dict,
)
import logging
from typing import (
Any,
AsyncIterable,
Callable,
Collection,
Dict,
Generator,
Iterable,
List,
Mapping,
Optional,
Tuple,
Union,
)
from ..client import Elasticsearch
from ..serializer import Serializer
+2 -1
View File
@@ -15,7 +15,8 @@
# specific language governing permissions and limitations
# under the License.
from typing import List, Any
from typing import Any, List
from ..exceptions import ElasticsearchException
class BulkIndexError(ElasticsearchException):
+2 -2
View File
@@ -17,9 +17,9 @@
# type: ignore
import time
import os
from unittest import TestCase, SkipTest
import time
from unittest import SkipTest, TestCase
from elasticsearch import Elasticsearch
from elasticsearch.exceptions import ConnectionError
+1
View File
@@ -17,6 +17,7 @@
from typing import Any, Tuple
from unittest import TestCase
from ..client import Elasticsearch
def get_test_client(nowait: bool = ..., **kwargs: Any) -> Elasticsearch: ...