Skip to content

Commit d19110c

Browse files
committed
Fix lint
1 parent 26a1084 commit d19110c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

elasticsearch/_sync/client/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,11 @@ def wrapped(*args: Any, **kwargs: Any) -> Any:
433433
category=GeneralAvailabilityWarning,
434434
stacklevel=warn_stacklevel(),
435435
)
436-
elif stability == Stability.DEPRECATED:
436+
elif stability == Stability.DEPRECATED and message and version:
437437
warnings.warn(
438-
message, category=DeprecationWarning, stacklevel=warn_stacklevel()
438+
f"In elasticsearch-py {version}, {message}.",
439+
category=DeprecationWarning,
440+
stacklevel=warn_stacklevel(),
439441
)
440442

441443
return api(*args, **kwargs)

0 commit comments

Comments
 (0)