diff --git a/elasticsearch/dsl/_async/document.py b/elasticsearch/dsl/_async/document.py index 3f5d69f11..c7ece2dea 100644 --- a/elasticsearch/dsl/_async/document.py +++ b/elasticsearch/dsl/_async/document.py @@ -28,9 +28,10 @@ cast, ) +from typing_extensions import Self, dataclass_transform + from elasticsearch.exceptions import NotFoundError, RequestError from elasticsearch.helpers import async_bulk -from typing_extensions import Self, dataclass_transform from .._async.index import AsyncIndex from ..async_connections import get_connection diff --git a/elasticsearch/dsl/_async/faceted_search.py b/elasticsearch/dsl/_async/faceted_search.py index 199dcfca1..545392254 100644 --- a/elasticsearch/dsl/_async/faceted_search.py +++ b/elasticsearch/dsl/_async/faceted_search.py @@ -18,7 +18,6 @@ from typing import TYPE_CHECKING from ..faceted_search_base import FacetedResponse, FacetedSearchBase - from ..utils import _R from .search import AsyncSearch diff --git a/elasticsearch/dsl/_async/index.py b/elasticsearch/dsl/_async/index.py index 71542dffd..58369579b 100644 --- a/elasticsearch/dsl/_async/index.py +++ b/elasticsearch/dsl/_async/index.py @@ -29,6 +29,7 @@ if TYPE_CHECKING: from elastic_transport import ObjectApiResponse + from elasticsearch import AsyncElasticsearch diff --git a/elasticsearch/dsl/_async/search.py b/elasticsearch/dsl/_async/search.py index ea6288622..42eb142fd 100644 --- a/elasticsearch/dsl/_async/search.py +++ b/elasticsearch/dsl/_async/search.py @@ -27,9 +27,10 @@ cast, ) +from typing_extensions import Self + from elasticsearch.exceptions import ApiError from elasticsearch.helpers import async_scan -from typing_extensions import Self from ..async_connections import get_connection from ..response import Response diff --git a/elasticsearch/dsl/_sync/document.py b/elasticsearch/dsl/_sync/document.py index c8143412f..3444563ad 100644 --- a/elasticsearch/dsl/_sync/document.py +++ b/elasticsearch/dsl/_sync/document.py @@ -28,9 +28,10 @@ cast, ) +from typing_extensions import Self, dataclass_transform + from elasticsearch.exceptions import NotFoundError, RequestError from elasticsearch.helpers import bulk -from typing_extensions import Self, dataclass_transform from .._sync.index import Index from ..connections import get_connection diff --git a/elasticsearch/dsl/_sync/faceted_search.py b/elasticsearch/dsl/_sync/faceted_search.py index 115492c7a..4bdac90de 100644 --- a/elasticsearch/dsl/_sync/faceted_search.py +++ b/elasticsearch/dsl/_sync/faceted_search.py @@ -18,7 +18,6 @@ from typing import TYPE_CHECKING from ..faceted_search_base import FacetedResponse, FacetedSearchBase - from ..utils import _R from .search import Search diff --git a/elasticsearch/dsl/_sync/index.py b/elasticsearch/dsl/_sync/index.py index 171f70bfb..b2d5830d9 100644 --- a/elasticsearch/dsl/_sync/index.py +++ b/elasticsearch/dsl/_sync/index.py @@ -29,6 +29,7 @@ if TYPE_CHECKING: from elastic_transport import ObjectApiResponse + from elasticsearch import Elasticsearch diff --git a/elasticsearch/dsl/_sync/search.py b/elasticsearch/dsl/_sync/search.py index f3e028347..f46364a67 100644 --- a/elasticsearch/dsl/_sync/search.py +++ b/elasticsearch/dsl/_sync/search.py @@ -18,9 +18,10 @@ import contextlib from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, cast +from typing_extensions import Self + from elasticsearch.exceptions import ApiError from elasticsearch.helpers import scan -from typing_extensions import Self from ..connections import get_connection from ..response import Response diff --git a/elasticsearch/dsl/aggs.py b/elasticsearch/dsl/aggs.py index 6175027d7..6c51c3ace 100644 --- a/elasticsearch/dsl/aggs.py +++ b/elasticsearch/dsl/aggs.py @@ -43,7 +43,6 @@ from elastic_transport.client_utils import DefaultType from . import types - from .document_base import InstrumentedField from .search_base import SearchBase diff --git a/elasticsearch/dsl/query.py b/elasticsearch/dsl/query.py index 1b3d9f22b..0a7d288c8 100644 --- a/elasticsearch/dsl/query.py +++ b/elasticsearch/dsl/query.py @@ -49,7 +49,6 @@ from elastic_transport.client_utils import DefaultType from . import types, wrappers - from .document_base import InstrumentedField _T = TypeVar("_T") diff --git a/elasticsearch/dsl/search.py b/elasticsearch/dsl/search.py index eea200e00..bf2036ffd 100644 --- a/elasticsearch/dsl/search.py +++ b/elasticsearch/dsl/search.py @@ -15,14 +15,6 @@ # specific language governing permissions and limitations # under the License. -from ._async.search import ( # noqa: F401 - AsyncEmptySearch, - AsyncMultiSearch, - AsyncSearch, -) -from ._sync.search import ( # noqa: F401 - EmptySearch, - MultiSearch, - Search, -) +from ._async.search import AsyncEmptySearch, AsyncMultiSearch, AsyncSearch # noqa: F401 +from ._sync.search import EmptySearch, MultiSearch, Search # noqa: F401 from .search_base import Q # noqa: F401 diff --git a/elasticsearch/dsl/utils.py b/elasticsearch/dsl/utils.py index b425f79a4..fb5848e20 100644 --- a/elasticsearch/dsl/utils.py +++ b/elasticsearch/dsl/utils.py @@ -43,6 +43,7 @@ if TYPE_CHECKING: from elastic_transport import ObjectApiResponse + from elasticsearch import AsyncElasticsearch, Elasticsearch from .document_base import DocumentOptions diff --git a/examples/dsl/async/composite_agg.py b/examples/dsl/async/composite_agg.py index f9a7640a3..e6ea62cc6 100644 --- a/examples/dsl/async/composite_agg.py +++ b/examples/dsl/async/composite_agg.py @@ -19,10 +19,9 @@ import os from typing import Any, AsyncIterator, Dict, Mapping, Sequence, cast -from elasticsearch.helpers import async_bulk - from elasticsearch.dsl import Agg, AsyncSearch, Response, aggs, async_connections from elasticsearch.dsl.types import CompositeAggregate +from elasticsearch.helpers import async_bulk from test_elasticsearch.test_dsl.test_integration.test_data import DATA, GIT_INDEX diff --git a/examples/dsl/composite_agg.py b/examples/dsl/composite_agg.py index 6710222b8..56f7ae7a6 100644 --- a/examples/dsl/composite_agg.py +++ b/examples/dsl/composite_agg.py @@ -18,10 +18,9 @@ import os from typing import Any, Dict, Iterator, Mapping, Sequence, cast -from elasticsearch.helpers import bulk - from elasticsearch.dsl import Agg, Response, Search, aggs, connections from elasticsearch.dsl.types import CompositeAggregate +from elasticsearch.helpers import bulk from test_elasticsearch.test_dsl.test_integration.test_data import DATA, GIT_INDEX diff --git a/setup.cfg b/setup.cfg index 403f26a50..4d1925616 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [flake8] -ignore = E203, E266, E501, W503 +ignore = E203, E266, E501, W503, E704, E741 diff --git a/test_elasticsearch/test_dsl/conftest.py b/test_elasticsearch/test_dsl/conftest.py index f1d865761..2e5fa91af 100644 --- a/test_elasticsearch/test_dsl/conftest.py +++ b/test_elasticsearch/test_dsl/conftest.py @@ -27,15 +27,15 @@ import pytest_asyncio from elastic_transport import ObjectApiResponse -from elasticsearch import AsyncElasticsearch, Elasticsearch -from elasticsearch.exceptions import ConnectionError -from elasticsearch.helpers import bulk from pytest import fixture, skip +from elasticsearch import AsyncElasticsearch, Elasticsearch from elasticsearch.dsl import Search from elasticsearch.dsl.async_connections import add_connection as add_async_connection from elasticsearch.dsl.async_connections import connections as async_connections from elasticsearch.dsl.connections import add_connection, connections +from elasticsearch.exceptions import ConnectionError +from elasticsearch.helpers import bulk from .test_integration._async import test_document as async_document from .test_integration._sync import test_document as sync_document diff --git a/test_elasticsearch/test_dsl/test_connections.py b/test_elasticsearch/test_dsl/test_connections.py index 96706d298..dcaa59a98 100644 --- a/test_elasticsearch/test_dsl/test_connections.py +++ b/test_elasticsearch/test_dsl/test_connections.py @@ -17,9 +17,9 @@ from typing import Any, List -from elasticsearch import Elasticsearch from pytest import raises +from elasticsearch import Elasticsearch from elasticsearch.dsl import connections, serializer diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_analysis.py b/test_elasticsearch/test_dsl/test_integration/_async/test_analysis.py index 1feae56cf..00598d4d5 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_analysis.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_analysis.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import analyzer, token_filter, tokenizer diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_document.py b/test_elasticsearch/test_dsl/test_integration/_async/test_document.py index 83b683e1e..e72955a0a 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_document.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_document.py @@ -26,11 +26,10 @@ from typing import TYPE_CHECKING, Any, AsyncIterator, Dict, List, Tuple, Union import pytest -from elasticsearch import AsyncElasticsearch, ConflictError, NotFoundError -from elasticsearch.helpers.errors import BulkIndexError from pytest import raises from pytz import timezone +from elasticsearch import AsyncElasticsearch, ConflictError, NotFoundError from elasticsearch.dsl import ( AsyncDocument, AsyncSearch, @@ -54,6 +53,7 @@ mapped_field, ) from elasticsearch.dsl.utils import AttrList +from elasticsearch.helpers.errors import BulkIndexError snowball = analyzer("my_snow", tokenizer="standard", filter=["lowercase", "snowball"]) diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_faceted_search.py b/test_elasticsearch/test_dsl/test_integration/_async/test_faceted_search.py index 5efc7033e..276fd0d1c 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_faceted_search.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_faceted_search.py @@ -19,8 +19,8 @@ from typing import Tuple, Type import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import A, AsyncDocument, AsyncSearch, Boolean, Date, Keyword from elasticsearch.dsl.faceted_search import ( AsyncFacetedSearch, diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_index.py b/test_elasticsearch/test_dsl/test_integration/_async/test_index.py index 10c426e5d..e150d1e59 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_index.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_index.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import ( AsyncComposableIndexTemplate, AsyncDocument, diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_mapping.py b/test_elasticsearch/test_dsl/test_integration/_async/test_mapping.py index 3f860ba59..f370c89c4 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_mapping.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_mapping.py @@ -16,9 +16,9 @@ # under the License. import pytest -from elasticsearch import AsyncElasticsearch from pytest import raises +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import AsyncMapping, analysis, exceptions diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_search.py b/test_elasticsearch/test_dsl/test_integration/_async/test_search.py index 627656dfd..a63f6746a 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_search.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_search.py @@ -17,9 +17,9 @@ import pytest -from elasticsearch import ApiError, AsyncElasticsearch from pytest import raises +from elasticsearch import ApiError, AsyncElasticsearch from elasticsearch.dsl import ( AsyncDocument, AsyncMultiSearch, diff --git a/test_elasticsearch/test_dsl/test_integration/_async/test_update_by_query.py b/test_elasticsearch/test_dsl/test_integration/_async/test_update_by_query.py index 1fbf9d0e9..b051d284a 100644 --- a/test_elasticsearch/test_dsl/test_integration/_async/test_update_by_query.py +++ b/test_elasticsearch/test_dsl/test_integration/_async/test_update_by_query.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import AsyncUpdateByQuery from elasticsearch.dsl.search import Q diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_analysis.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_analysis.py index a12756c62..87e5350ba 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_analysis.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_analysis.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import analyzer, token_filter, tokenizer diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_document.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_document.py index 08f983b6e..13b60f71b 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_document.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_document.py @@ -26,11 +26,10 @@ from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Tuple, Union import pytest -from elasticsearch import ConflictError, Elasticsearch, NotFoundError -from elasticsearch.helpers.errors import BulkIndexError from pytest import raises from pytz import timezone +from elasticsearch import ConflictError, Elasticsearch, NotFoundError from elasticsearch.dsl import ( Binary, Boolean, @@ -54,6 +53,7 @@ mapped_field, ) from elasticsearch.dsl.utils import AttrList +from elasticsearch.helpers.errors import BulkIndexError snowball = analyzer("my_snow", tokenizer="standard", filter=["lowercase", "snowball"]) diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_faceted_search.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_faceted_search.py index 114800644..8d9baa255 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_faceted_search.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_faceted_search.py @@ -19,8 +19,8 @@ from typing import Tuple, Type import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import A, Boolean, Date, Document, Keyword, Search from elasticsearch.dsl.faceted_search import ( DateHistogramFacet, diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_index.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_index.py index 7509f0b0f..51a7dc40e 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_index.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_index.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import ( ComposableIndexTemplate, Date, diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_mapping.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_mapping.py index 270e79a5e..3ce1737db 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_mapping.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_mapping.py @@ -16,9 +16,9 @@ # under the License. import pytest -from elasticsearch import Elasticsearch from pytest import raises +from elasticsearch import Elasticsearch from elasticsearch.dsl import Mapping, analysis, exceptions diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_search.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_search.py index 1ce578fa5..54060d311 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_search.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_search.py @@ -17,9 +17,9 @@ import pytest -from elasticsearch import ApiError, Elasticsearch from pytest import raises +from elasticsearch import ApiError, Elasticsearch from elasticsearch.dsl import Date, Document, Keyword, MultiSearch, Q, Search, Text from elasticsearch.dsl.response import aggs diff --git a/test_elasticsearch/test_dsl/test_integration/_sync/test_update_by_query.py b/test_elasticsearch/test_dsl/test_integration/_sync/test_update_by_query.py index f16505d49..e6c870a5c 100644 --- a/test_elasticsearch/test_dsl/test_integration/_sync/test_update_by_query.py +++ b/test_elasticsearch/test_dsl/test_integration/_sync/test_update_by_query.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import UpdateByQuery from elasticsearch.dsl.search import Q diff --git a/test_elasticsearch/test_dsl/test_integration/test_count.py b/test_elasticsearch/test_dsl/test_integration/test_count.py index 5d52607bc..583a09dd2 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_count.py +++ b/test_elasticsearch/test_dsl/test_integration/test_count.py @@ -18,7 +18,6 @@ from typing import Any from elasticsearch import Elasticsearch - from elasticsearch.dsl.search import Q, Search diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_alias_migration.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_alias_migration.py index dae4c973f..d2b4294a4 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_alias_migration.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_alias_migration.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import AsyncElasticsearch from ..async_examples import alias_migration diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_completion.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_completion.py index e9716c1d2..13e73e14a 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_completion.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_completion.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import AsyncElasticsearch from ..async_examples.completion import Person diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_composite_aggs.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_composite_aggs.py index 4bb4e68a3..2d3ab2df7 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_composite_aggs.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_composite_aggs.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import A, AsyncSearch from ..async_examples.composite_agg import scan_aggs diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_parent_child.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_parent_child.py index 4d8527081..a730c8839 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_parent_child.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_parent_child.py @@ -19,8 +19,8 @@ import pytest import pytest_asyncio -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from elasticsearch.dsl import Q from ..async_examples.parent_child import Answer, Comment, Question, User, setup diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_percolate.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_percolate.py index d1564d94b..cf1721b8e 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_percolate.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_percolate.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import AsyncElasticsearch from ..async_examples.percolate import BlogPost, setup diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_vectors.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_vectors.py index 7d3acdd34..49c2c01da 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_vectors.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_async/test_vectors.py @@ -20,8 +20,8 @@ from unittest import SkipTest import pytest -from elasticsearch import AsyncElasticsearch +from elasticsearch import AsyncElasticsearch from test_elasticsearch.test_dsl.async_sleep import sleep from ..async_examples import vectors diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_alias_migration.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_alias_migration.py index 9a74b699b..9b811b692 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_alias_migration.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_alias_migration.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import Elasticsearch from ..examples import alias_migration diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_completion.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_completion.py index 6dec13e20..472e067ae 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_completion.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_completion.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import Elasticsearch from ..examples.completion import Person diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_composite_aggs.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_composite_aggs.py index f7d519f92..95581a912 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_composite_aggs.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_composite_aggs.py @@ -16,8 +16,8 @@ # under the License. import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import A, Search from ..examples.composite_agg import scan_aggs diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_parent_child.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_parent_child.py index 514f03686..faa1771f9 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_parent_child.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_parent_child.py @@ -18,8 +18,8 @@ from datetime import datetime import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from elasticsearch.dsl import Q from ..examples.parent_child import Answer, Comment, Question, User, setup diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_percolate.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_percolate.py index 925d362c2..c8b4d2095 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_percolate.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_percolate.py @@ -16,6 +16,7 @@ # under the License. import pytest + from elasticsearch import Elasticsearch from ..examples.percolate import BlogPost, setup diff --git a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_vectors.py b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_vectors.py index ff0d0e759..2bfdce8c5 100644 --- a/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_vectors.py +++ b/test_elasticsearch/test_dsl/test_integration/test_examples/_sync/test_vectors.py @@ -20,8 +20,8 @@ from unittest import SkipTest import pytest -from elasticsearch import Elasticsearch +from elasticsearch import Elasticsearch from test_elasticsearch.test_dsl.sleep import sleep from ..examples import vectors diff --git a/test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py b/test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py index 3e17442eb..f44334fc4 100644 --- a/test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py +++ b/test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py @@ -485,7 +485,7 @@ def assert_query( ) store.add_texts(texts) - ## without fetch_k parameter + # without fetch_k parameter output = store.search( query="foo", k=3, @@ -551,7 +551,7 @@ def assert_query( ) store.add_texts(texts) - ## with fetch_k parameter + # with fetch_k parameter output = store.search( query="foo", k=3,