From 1e9cc0894c141362e90e1899ccc0ae6fdf925a54 Mon Sep 17 00:00:00 2001 From: stchabi Date: Tue, 24 Dec 2024 11:23:07 +0100 Subject: [PATCH] fix(LAB-3357): Add a deprecate warning on the update_properties_in_label method (#1839) Co-authored-by: Sihem Tchabi --- src/kili/presentation/client/label.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kili/presentation/client/label.py b/src/kili/presentation/client/label.py index 3af4318f2..c4e4647c1 100644 --- a/src/kili/presentation/client/label.py +++ b/src/kili/presentation/client/label.py @@ -772,6 +772,12 @@ def update_properties_in_label( Examples: >>> kili.update_properties_in_label(label_id=label_id, json_response={...}) """ + warnings.warn( + "The method `update_properties_in_label` is going to be deprecated. Please use" + " `kili.append_labels` method instead to add a new label.", + DeprecationWarning, + stacklevel=1, + ) return LabelUseCases(self.kili_api_gateway).update_properties_in_label( label_id=LabelId(label_id), seconds_to_label=seconds_to_label,