Skip to content

Commit 5aa5ae5

Browse files
committed
deprecation docs update
1 parent f58438f commit 5aa5ae5

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

labelbox/data/annotation_types/classification/classification.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def dict(self, *args, **kwargs):
1919
res.pop('name')
2020
return res
2121

22+
2223
class ClassificationAnswer(FeatureSchema):
2324
"""
2425
- Represents a classification option.
@@ -72,12 +73,15 @@ class Dropdown(_TempName):
7273
"""
7374
- A classification with many selected options allowed .
7475
- This is not currently compatible with MAL.
76+
77+
Deprecation Notice: Dropdown classification is deprecated and will be
78+
removed in a future release. Dropdown will also
79+
no longer be able to be created in the Editor on 3/31/2022.
7580
"""
7681
name: Literal["dropdown"] = "dropdown"
77-
answer: List[ClassificationAnswer]
82+
answer: List[ClassificationAnswer]
7883

7984
def __init__(self, **data: Any):
80-
warnings.warn(
81-
"Dropdown classification is deprecated and will be "
82-
"removed in a future release")
83-
super().__init__(**data)
85+
warnings.warn("Dropdown classification is deprecated and will be "
86+
"removed in a future release")
87+
super().__init__(**data)

labelbox/schema/ontology.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def add_option(self, option: 'Classification') -> None:
8383
@dataclass
8484
class Classification:
8585
"""
86+
87+
Deprecation Notice: Dropdown classification is deprecated and will be
88+
removed in a future release. Dropdown will also
89+
no longer be able to be created in the Editor on 3/31/2022.
90+
8691
A classfication to be added to a Project's ontology. The
8792
classification is dependent on the Classification Type.
8893
@@ -131,9 +136,9 @@ class Type(Enum):
131136
def __post_init__(self):
132137
if self.class_type == Classification.Type.DROPDOWN:
133138
warnings.warn(
134-
"Dropdown classification is deprecated and will be "
135-
"removed in a future release. Dropdown will also "
136-
"no longer be able to be created in the Editor on 3/31/2022.")
139+
"Dropdown classification is deprecated and will be "
140+
"removed in a future release. Dropdown will also "
141+
"no longer be able to be created in the Editor on 3/31/2022.")
137142

138143
@property
139144
def name(self) -> str:

0 commit comments

Comments
 (0)