Skip to content

Commit f599fba

Browse files
author
gdj0nes
committed
FIX: formatting
1 parent cec4fb1 commit f599fba

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

labelbox/data/serialization/labelbox_v1/classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def from_common(
139139

140140
@staticmethod
141141
def lookup_classification(
142-
annotation: ClassificationAnnotation
142+
annotation: ClassificationAnnotation
143143
) -> Union[LBV1Text, LBV1Checklist, LBV1Radio, LBV1Checklist]:
144144
return {
145145
Text: LBV1Text,

labelbox/data/serialization/labelbox_v1/objects.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def from_common(cls, rectangle: Rectangle,
6565
height=rectangle.end.y - rectangle.start.y,
6666
width=rectangle.end.x - rectangle.start.x,
6767
),
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)
7272

7373

7474
class LBV1Polygon(LBV1ObjectBase):
@@ -83,12 +83,13 @@ def from_common(cls, polygon: Polygon,
8383
feature_schema_id: Cuid, title: str,
8484
extra: Dict[str, Any]) -> "LBV1Polygon":
8585
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
8789
classifications=classifications,
8890
schema_id=feature_schema_id,
8991
title=title,
90-
**extra
91-
)
92+
**extra)
9293

9394

9495
class LBV1Point(LBV1ObjectBase):
@@ -175,12 +176,12 @@ def from_common(cls, text_entity: TextEntity,
175176
classifications: List[ClassificationAnnotation],
176177
feature_schema_id: Cuid, title: str,
177178
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)
184185

185186

186187
class LBV1Objects(BaseModel):
@@ -231,8 +232,9 @@ def from_common(cls, annotations: List[ObjectAnnotation]) -> "LBV1Objects":
231232

232233
@staticmethod
233234
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]]:
236238
result = {
237239
Line: LBV1Line,
238240
Point: LBV1Point,

0 commit comments

Comments
 (0)