Skip to content

Commit

Permalink
Change import order
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Jul 3, 2024
1 parent f31fda4 commit 9a9c67c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ray_elasticsearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

_es_import_error: Optional[ImportError]
try:
from elasticsearch import Elasticsearch # type: ignore
from elasticsearch.helpers import streaming_bulk # type: ignore
from elasticsearch8 import Elasticsearch # type: ignore
from elasticsearch8.helpers import streaming_bulk # type: ignore
_es_import_error = None
except ImportError as e:
_es_import_error = e
Expand All @@ -33,8 +33,8 @@
_es_import_error = e
if _es_import_error is not None:
try:
from elasticsearch8 import Elasticsearch # type: ignore
from elasticsearch8.helpers import streaming_bulk # type: ignore
from elasticsearch import Elasticsearch # type: ignore
from elasticsearch.helpers import streaming_bulk # type: ignore
_es_import_error = None
except ImportError as e:
_es_import_error = e
Expand Down Expand Up @@ -258,8 +258,8 @@ def num_rows_per_write(self) -> Optional[int]:

_es_dsl_import_error: Optional[ImportError]
try:
from elasticsearch_dsl import Document # type: ignore
from elasticsearch_dsl.query import Query # type: ignore
from elasticsearch_dsl8 import Document # type: ignore
from elasticsearch_dsl8.query import Query # type: ignore
_es_dsl_import_error = None
except ImportError as e:
_es_dsl_import_error = e
Expand All @@ -272,8 +272,8 @@ def num_rows_per_write(self) -> Optional[int]:
_es_dsl_import_error = e
if _es_dsl_import_error is not None:
try:
from elasticsearch8_dsl import Document # type: ignore
from elasticsearch8_dsl.query import Query # type: ignore
from elasticsearch_dsl import Document # type: ignore
from elasticsearch_dsl.query import Query # type: ignore
_es_dsl_import_error = None
except ImportError as e:
_es_dsl_import_error = e
Expand Down

0 comments on commit 9a9c67c

Please sign in to comment.