Skip to content

Commit 14f0072

Browse files
committed
update
1 parent db64b0f commit 14f0072

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

labelbox/schema/ontology.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def asdict(self) -> Dict[str, Any]:
5858
"options": [o.asdict() for o in self.options]
5959
}
6060

61-
def add_option(self, option: 'Classification') -> 'Classification':
61+
def add_option(self, option: 'Classification'):
6262
if option.instructions in (o.instructions for o in self.options):
6363
raise InconsistentOntologyException(
6464
f"Duplicate nested classification '{option.instructions}' "
@@ -193,7 +193,7 @@ class Type(Enum):
193193
tool: Type
194194
name: str
195195
required: bool = False
196-
color: str = None
196+
color: Optional[str] = None
197197
classifications: List[Classification] = field(default_factory=list)
198198
schema_id: Optional[str] = None
199199
feature_schema_id: Optional[str] = None
@@ -339,14 +339,13 @@ def from_project(cls, project: Project):
339339
ontology = project.ontology().normalized
340340
return OntologyBuilder.from_dict(ontology)
341341

342-
def add_tool(self, tool: Tool) -> Tool:
342+
def add_tool(self, tool: Tool):
343343
if tool.name in (t.name for t in self.tools):
344344
raise InconsistentOntologyException(
345345
f"Duplicate tool name '{tool.name}'. ")
346346
self.tools.append(tool)
347347

348-
def add_classification(self,
349-
classification: Classification) -> Classification:
348+
def add_classification(self, classification: Classification):
350349
if classification.instructions in (
351350
c.instructions for c in self.classifications):
352351
raise InconsistentOntologyException(

0 commit comments

Comments
 (0)