Skip to content

Commit ce65a79

Browse files
author
Matt Sokoloff
committed
format
1 parent 32b15a8 commit ce65a79

File tree

9 files changed

+13
-11
lines changed

9 files changed

+13
-11
lines changed

labelbox/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,4 +503,3 @@ def get_roles(self):
503503
Roles are used for user management.
504504
"""
505505
return role.get_roles(self)
506-

labelbox/data/annotation_types/collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def _add_url_to_masks(label: Label):
238238
self._fns['add_url_to_masks'] = _add_url_to_masks
239239
return self
240240

241-
def register_background_fn(self, fn: Callable[[Label], Label], name: str) -> "LabelGenerator":
241+
def register_background_fn(self, fn: Callable[[Label], Label],
242+
name: str) -> "LabelGenerator":
242243
"""
243244
Allows users to add arbitrary io functions to the generator.
244245
These functions will be exectuted in parallel and added to a prefetch queue.
@@ -251,7 +252,6 @@ def register_background_fn(self, fn: Callable[[Label], Label], name: str) -> "La
251252
self._fns[name] = fn
252253
return self
253254

254-
255255
def __iter__(self):
256256
return self
257257

labelbox/data/serialization/labelbox_v1/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def label_generator():
5353

5454
@staticmethod
5555
def serialize(
56-
labels: LabelContainer) -> Generator[Dict[str, Any], None, None]:
56+
labels: LabelContainer) -> Generator[Dict[str, Any], None, None]:
5757
"""
5858
Converts a labelbox common object to the labelbox json export format
5959

labelbox/data/serialization/labelbox_v1/label.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ def from_common(cls, label: Label):
166166
label_ = LBV1LabelAnnotations.from_common(label.annotations)
167167

168168
if label.data.url is None:
169-
raise ValueError("Url attribute required for serializing data objects. "
170-
"Use <LabelCollection,LabelGenerator>.add_url_to_data "
171-
"or <LabelCollection,LabelGenerator>.add_to_dataset")
169+
raise ValueError(
170+
"Url attribute required for serializing data objects. "
171+
"Use <LabelCollection,LabelGenerator>.add_url_to_data "
172+
"or <LabelCollection,LabelGenerator>.add_to_dataset")
172173

173174
return LBV1Label(label=label_,
174175
data_row_id=label.data.uid,

labelbox/data/serialization/ndjson/converter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def deserialize(json_data: Iterable[Dict[str, Any]]) -> LabelGenerator:
2323
return data.to_common()
2424

2525
@staticmethod
26-
def serialize(labels: LabelContainer) -> Generator[Dict[str, Any], None, None]:
26+
def serialize(
27+
labels: LabelContainer) -> Generator[Dict[str, Any], None, None]:
2728
"""
2829
Converts a labelbox common object to the labelbox ndjson format (prediction import format)
2930

labelbox/data/serialization/ndjson/label.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def to_common(self) -> LabelGenerator:
2525
data=self._generate_annotations(grouped_annotations))
2626

2727
@classmethod
28-
def from_common(cls, data: LabelContainer) -> Generator["NDLabel", None, None]:
28+
def from_common(cls,
29+
data: LabelContainer) -> Generator["NDLabel", None, None]:
2930
for label in data:
3031
yield from cls._create_non_video_annotations(label)
3132
yield from cls._create_video_annotations(label)

labelbox/schema/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def export_labels(self):
204204
json_data = self.export_labels_json()
205205
return LBV1Converter.deserialize(json_data)
206206

207-
def export_labels_json(self, timeout_seconds = 60):
207+
def export_labels_json(self, timeout_seconds=60):
208208
""" Calls the server-side Label exporting that generates a JSON
209209
payload, and returns the URL to that payload.
210210

labelbox/schema/user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from labelbox.orm.model import Field, Relationship
33
from labelbox.schema.role import Role
44

5+
56
class User(DbObject):
67
""" A User is a registered Labelbox user (for example you) associated with
78
data they create or import and an Organization they belong to.

tests/integration/test_ontology.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import pytest
32

43
from labelbox.exceptions import InconsistentOntologyException

0 commit comments

Comments
 (0)