11# type: ignore
2-
2+ from dataclasses import field
33import colorsys
44import json
55import warnings
66from enum import Enum
77from typing import Annotated , Any , Dict , List , Optional , Type , Union
88
99from lbox .exceptions import InconsistentOntologyException
10- from pydantic import StringConstraints , Field
10+ from pydantic import StringConstraints
1111from pydantic .dataclasses import dataclass
1212
1313from labelbox .orm .db_object import DbObject
14- from labelbox .orm .model import Field as LB_Field , Relationship
14+ from labelbox .orm .model import Field , Relationship
1515from labelbox .schema .tool_building .step_reasoning_tool import StepReasoningTool
1616from labelbox .schema .tool_building .tool_type import ToolType
1717
@@ -35,9 +35,9 @@ def __str__(self):
3535
3636
3737class FeatureSchema (DbObject ):
38- name = LB_Field .String ("name" )
39- color = LB_Field .String ("name" )
40- normalized = LB_Field .Json ("normalized" )
38+ name = Field .String ("name" )
39+ color = Field .String ("name" )
40+ normalized = Field .Json ("normalized" )
4141
4242
4343@dataclass
@@ -64,7 +64,7 @@ class Option:
6464 feature_schema_id : Optional [FeatureSchemaId ] = None
6565 options : Union [
6666 List ["Classification" ], List ["PromptResponseClassification" ]
67- ] = Field (default_factory = list )
67+ ] = field (default_factory = list )
6868
6969 def __post_init__ (self ):
7070 if self .label is None :
@@ -160,7 +160,7 @@ class UIMode(Enum):
160160 name : Optional [str ] = None
161161 instructions : Optional [str ] = None
162162 required : bool = False
163- options : List [Option ] = Field (default_factory = list )
163+ options : List [Option ] = field (default_factory = list )
164164 schema_id : Optional [str ] = None
165165 feature_schema_id : Optional [str ] = None
166166 scope : Scope = None
@@ -344,7 +344,7 @@ class Type(Enum):
344344 name : Optional [str ] = None
345345 instructions : Optional [str ] = None
346346 required : bool = True
347- options : List [ResponseOption ] = Field (default_factory = list )
347+ options : List [ResponseOption ] = field (default_factory = list )
348348 character_min : Optional [int ] = None
349349 character_max : Optional [int ] = None
350350 schema_id : Optional [str ] = None
@@ -449,7 +449,7 @@ class Type(Enum):
449449 name : str
450450 required : bool = False
451451 color : Optional [str ] = None
452- classifications : List [Classification ] = Field (default_factory = list )
452+ classifications : List [Classification ] = field (default_factory = list )
453453 schema_id : Optional [str ] = None
454454 feature_schema_id : Optional [str ] = None
455455
@@ -517,13 +517,13 @@ class Ontology(DbObject):
517517 created_by (Relationship): `ToOne` relationship to User
518518 """
519519
520- name = LB_Field .String ("name" )
521- description = LB_Field .String ("description" )
522- updated_at = LB_Field .DateTime ("updated_at" )
523- created_at = LB_Field .DateTime ("created_at" )
524- normalized = LB_Field .Json ("normalized" )
525- object_schema_count = LB_Field .Int ("object_schema_count" )
526- classification_schema_count = LB_Field .Int ("classification_schema_count" )
520+ name = Field .String ("name" )
521+ description = Field .String ("description" )
522+ updated_at = Field .DateTime ("updated_at" )
523+ created_at = Field .DateTime ("created_at" )
524+ normalized = Field .Json ("normalized" )
525+ object_schema_count = Field .Int ("object_schema_count" )
526+ classification_schema_count = Field .Int ("classification_schema_count" )
527527
528528 projects = Relationship .ToMany ("Project" , True )
529529 created_by = Relationship .ToOne ("User" , False , "created_by" )
0 commit comments