Skip to content

Commit ab1aa35

Browse files
committed
Add missing error codes
1 parent cdbbc8e commit ab1aa35

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

elasticsearch/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
from ._version import __versionstr__
2828

2929
# Ensure that a compatible version of elastic-transport is installed.
30-
_version_groups = tuple(int(x) for x in re.search(r"^(\d+)\.(\d+)\.(\d+)", _elastic_transport_version).groups()) # type: ignore
30+
_version_groups = tuple(int(x) for x in re.search(r"^(\d+)\.(\d+)\.(\d+)", _elastic_transport_version).groups()) # type: ignore[union-attr]
3131
if _version_groups < (8, 0, 0) or _version_groups > (9, 0, 0):
3232
raise ImportError(
3333
"An incompatible version of elastic-transport is installed. Must be between "
3434
"v8.0.0 and v9.0.0. Install the correct version with the following command: "
3535
"$ python -m pip install 'elastic-transport>=8, <9'"
3636
)
3737

38-
_version_groups = re.search(r"^(\d+)\.(\d+)\.(\d+)", __versionstr__).groups() # type: ignore
38+
_version_groups = re.search(r"^(\d+)\.(\d+)\.(\d+)", __versionstr__).groups() # type: ignore[assignment, union-attr]
3939
_major, _minor, _patch = (int(x) for x in _version_groups)
4040
VERSION = __version__ = (_major, _minor, _patch)
4141

elasticsearch/_async/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ async def map_actions() -> AsyncIterable[_TYPE_BULK_ACTION_HEADER_AND_BODY]:
257257
]
258258
ok: bool
259259
info: Dict[str, Any]
260-
async for data, (ok, info) in azip( # type: ignore
260+
async for data, (ok, info) in azip( # type: ignore[assignment, misc]
261261
bulk_data,
262262
_process_bulk_chunk(
263263
client,

elasticsearch/_sync/client/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def host_mapping_to_node_config(host: Mapping[str, Union[str, int]]) -> NodeConf
232232
)
233233
options["path_prefix"] = options.pop("url_prefix")
234234

235-
return NodeConfig(**options) # type: ignore
235+
return NodeConfig(**options) # type: ignore[arg-type]
236236

237237

238238
def cloud_id_to_node_configs(cloud_id: str) -> List[NodeConfig]:

elasticsearch/helpers/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def parallel_bulk(
593593

594594
class BlockingPool(ThreadPool):
595595
def _setup_queues(self) -> None:
596-
super()._setup_queues() # type: ignore
596+
super()._setup_queues() # type: ignore[misc]
597597
# The queue must be at least the size of the number of threads to
598598
# prevent hanging when inserting sentinel values during teardown.
599599
self._inqueue: Queue[

0 commit comments

Comments
 (0)