[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
+2 -4
View File
@@ -17,7 +17,5 @@
from .base import Connection as Connection
from .http_requests import RequestsHttpConnection as RequestsHttpConnection
from .http_urllib3 import (
Urllib3HttpConnection as Urllib3HttpConnection,
create_ssl_context as create_ssl_context,
)
from .http_urllib3 import Urllib3HttpConnection as Urllib3HttpConnection
from .http_urllib3 import create_ssl_context as create_ssl_context
+8 -8
View File
@@ -15,26 +15,26 @@
# specific language governing permissions and limitations
# under the License.
import logging
import binascii
import gzip
import io
import logging
import re
from platform import python_version
import warnings
from platform import python_version
try:
import simplejson as json
except ImportError:
import json
from ..exceptions import (
TransportError,
ImproperlyConfigured,
ElasticsearchWarning,
HTTP_EXCEPTIONS,
)
from .. import __versionstr__
from ..exceptions import (
HTTP_EXCEPTIONS,
ElasticsearchWarning,
ImproperlyConfigured,
TransportError,
)
logger = logging.getLogger("elasticsearch")
+9 -10
View File
@@ -16,19 +16,18 @@
# under the License.
import logging
from typing import (
Union,
Optional,
Mapping,
MutableMapping,
Tuple,
List,
NoReturn,
Dict,
Sequence,
Any,
Collection,
Dict,
List,
Mapping,
MutableMapping,
NoReturn,
Optional,
Sequence,
Tuple,
Union,
)
logger: logging.Logger
+3 -3
View File
@@ -18,15 +18,15 @@
import time
import warnings
from .base import Connection
from ..compat import string_types, urlencode
from ..exceptions import (
ConnectionError,
ImproperlyConfigured,
ConnectionTimeout,
ImproperlyConfigured,
SSLError,
)
from ..compat import urlencode, string_types
from ..utils import _client_meta_version
from .base import Connection
try:
import requests
+3 -1
View File
@@ -15,8 +15,10 @@
# specific language governing permissions and limitations
# under the License.
from typing import Optional, Any, Mapping
from typing import Any, Mapping, Optional
import requests
from .base import Connection
class RequestsHttpConnection(Connection):
+9 -7
View File
@@ -15,22 +15,24 @@
# specific language governing permissions and limitations
# under the License.
import time
import ssl
import urllib3 # type: ignore
from urllib3.exceptions import ReadTimeoutError, SSLError as UrllibSSLError # type: ignore
from urllib3.util.retry import Retry # type: ignore
import time
import warnings
from .base import Connection
import urllib3 # type: ignore
from urllib3.exceptions import ReadTimeoutError
from urllib3.exceptions import SSLError as UrllibSSLError # type: ignore
from urllib3.util.retry import Retry # type: ignore
from ..compat import urlencode
from ..exceptions import (
ConnectionError,
ImproperlyConfigured,
ConnectionTimeout,
ImproperlyConfigured,
SSLError,
)
from ..compat import urlencode
from ..utils import _client_meta_version
from .base import Connection
# sentinel value for `verify_certs` and `ssl_show_warn`.
# This is used to detect if a user is passing in a value
+3 -1
View File
@@ -16,8 +16,10 @@
# under the License.
import ssl
from typing import Optional, Mapping, Any, Union
from typing import Any, Mapping, Optional, Union
import urllib3 # type: ignore
from .base import Connection
def create_ssl_context(