@@ -65,10 +65,10 @@ def from_common(cls, rectangle: Rectangle,
65
65
height = rectangle .end .y - rectangle .start .y ,
66
66
width = rectangle .end .x - rectangle .start .x ,
67
67
),
68
- schema_id = feature_schema_id ,
69
- title = title ,
70
- classifications = classifications ,
71
- ** extra )
68
+ schema_id = feature_schema_id ,
69
+ title = title ,
70
+ classifications = classifications ,
71
+ ** extra )
72
72
73
73
74
74
class LBV1Polygon (LBV1ObjectBase ):
@@ -83,12 +83,13 @@ def from_common(cls, polygon: Polygon,
83
83
feature_schema_id : Cuid , title : str ,
84
84
extra : Dict [str , Any ]) -> "LBV1Polygon" :
85
85
return cls (
86
- polygon = [_Point (x = point .x , y = point .y ) for point in polygon .points [:- 1 ]], # drop closing point
86
+ polygon = [
87
+ _Point (x = point .x , y = point .y ) for point in polygon .points [:- 1 ]
88
+ ], # drop closing point
87
89
classifications = classifications ,
88
90
schema_id = feature_schema_id ,
89
91
title = title ,
90
- ** extra
91
- )
92
+ ** extra )
92
93
93
94
94
95
class LBV1Point (LBV1ObjectBase ):
@@ -175,12 +176,12 @@ def from_common(cls, text_entity: TextEntity,
175
176
classifications : List [ClassificationAnnotation ],
176
177
feature_schema_id : Cuid , title : str ,
177
178
extra : Dict [str , Any ]) -> "LBV1TextEntity" :
178
- return cls (
179
- data = _Location ( location = _TextPoint (start = text_entity .start , end = text_entity .end )),
180
- classifications = classifications ,
181
- schema_id = feature_schema_id ,
182
- title = title ,
183
- ** extra )
179
+ return cls (data = _Location (
180
+ location = _TextPoint (start = text_entity .start , end = text_entity .end )),
181
+ classifications = classifications ,
182
+ schema_id = feature_schema_id ,
183
+ title = title ,
184
+ ** extra )
184
185
185
186
186
187
class LBV1Objects (BaseModel ):
@@ -231,8 +232,9 @@ def from_common(cls, annotations: List[ObjectAnnotation]) -> "LBV1Objects":
231
232
232
233
@staticmethod
233
234
def lookup_object (
234
- annotation : ObjectAnnotation
235
- ) -> Type [Union [LBV1Line , LBV1Point , LBV1Polygon , LBV1Rectangle , LBV1Mask , LBV1TextEntity ]]:
235
+ annotation : ObjectAnnotation
236
+ ) -> Type [Union [LBV1Line , LBV1Point , LBV1Polygon , LBV1Rectangle , LBV1Mask ,
237
+ LBV1TextEntity ]]:
236
238
result = {
237
239
Line : LBV1Line ,
238
240
Point : LBV1Point ,
0 commit comments