Skip to content

Commit 45852a5

Browse files
author
Florijan Stamenković
authored
Remove trailing whitespace (#97)
1 parent c4fae6f commit 45852a5

File tree

14 files changed

+47
-47
lines changed

14 files changed

+47
-47
lines changed

labelbox/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727

2828
class Client:
29-
""" A Labelbox client.
30-
31-
Contains info necessary for connecting to a Labelbox server (URL,
32-
authentication key). Provides functions for querying and creating
33-
top-level data objects (Projects, Datasets).
29+
""" A Labelbox client.
30+
31+
Contains info necessary for connecting to a Labelbox server (URL,
32+
authentication key). Provides functions for querying and creating
33+
top-level data objects (Projects, Datasets).
3434
"""
3535

3636
def __init__(self,
@@ -73,8 +73,8 @@ def __init__(self,
7373
labelbox.exceptions.InternalServerError))
7474
def execute(self, query, params=None, timeout=10.0):
7575
""" Sends a request to the server for the execution of the
76-
given query.
77-
76+
given query.
77+
7878
Checks the response for errors and wraps errors
7979
in appropriate `labelbox.exceptions.LabelboxError` subtypes.
8080
@@ -336,7 +336,7 @@ def get_dataset(self, dataset_id):
336336

337337
def get_user(self):
338338
""" Gets the current User database object.
339-
339+
340340
>>> user = client.get_user()
341341
"""
342342
return self._get_single(User, None)
@@ -435,7 +435,7 @@ def _create(self, db_object_type, data):
435435

436436
def create_dataset(self, **kwargs):
437437
""" Creates a Dataset object on the server.
438-
438+
439439
Attribute values are passed as keyword arguments.
440440
441441
>>> project = client.get_project("<project_uid>")
@@ -452,8 +452,8 @@ def create_dataset(self, **kwargs):
452452
return self._create(Dataset, kwargs)
453453

454454
def create_project(self, **kwargs):
455-
""" Creates a Project object on the server.
456-
455+
""" Creates a Project object on the server.
456+
457457
Attribute values are passed as keyword arguments.
458458
459459
>>> project = client.create_project(name="<project_name>", description="<project_description>")

labelbox/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ResourceNotFoundError(LabelboxError):
3131

3232
def __init__(self, db_object_type, params):
3333
""" Constructor.
34-
34+
3535
Args:
3636
db_object_type (type): A labelbox.schema.DbObject subtype.
3737
params (dict): Dict of params identifying the sought resource.

labelbox/pagination.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class PaginatedCollection:
66
""" An iterable collection of database objects (Projects, Labels, etc...).
7-
7+
88
Implements automatic (transparent to the user) paginated fetching during
99
iteration. Intended for use by library internals and not by the end user.
1010
For a list of attributes see __init__(...) documentation. The params of
@@ -13,7 +13,7 @@ class PaginatedCollection:
1313

1414
def __init__(self, client, query, params, dereferencing, obj_class):
1515
""" Creates a PaginatedCollection.
16-
16+
1717
Args:
1818
client (labelbox.Client): the client used for fetching data from DB.
1919
query (str): Base query used for pagination. It must contain two

labelbox/schema/benchmark.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
class Benchmark(DbObject):
66
""" Represents a benchmark label.
7-
8-
The Benchmarks tool works by interspersing data to be labeled, for
9-
which there is a benchmark label, to each person labeling. These
7+
8+
The Benchmarks tool works by interspersing data to be labeled, for
9+
which there is a benchmark label, to each person labeling. These
1010
labeled data are compared against their respective benchmark and an
1111
accuracy score between 0 and 100 percent is calculated.
1212
@@ -15,7 +15,7 @@ class Benchmark(DbObject):
1515
last_activity (datetime)
1616
average_agreement (float)
1717
completed_count (int)
18-
18+
1919
created_by (Relationship): `ToOne` relationship to User
2020
reference_label (Relationship): `ToOne` relationship to Label
2121
"""

labelbox/schema/bulk_import_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class BulkImportRequest(DbObject):
101101
error_file_url (str): NDJSON that contains error messages for failed annotations
102102
status_file_url (str): NDJSON that contains status for each annotation
103103
created_at (datetime): UTC timestamp for date BulkImportRequest was created
104-
104+
105105
project (Relationship): `ToOne` relationship to Project
106106
created_by (Relationship): `ToOne` relationship to User
107107
"""
@@ -125,7 +125,7 @@ def refresh(self) -> None:
125125

126126
def wait_until_done(self, sleep_time_seconds: int = 30) -> None:
127127
"""Blocks import job until certain conditions are met.
128-
128+
129129
Blocks until the BulkImportRequest.state changes either to
130130
`BulkImportRequestState.FINISHED` or `BulkImportRequestState.FAILED`,
131131
periodically refreshing object's state.
@@ -209,8 +209,8 @@ def create_from_url(cls, client, project_id: str, name: str,
209209
def create_from_objects(cls, client, project_id: str, name: str,
210210
predictions: Iterable[dict]) -> 'BulkImportRequest':
211211
"""
212-
Creates a `BulkImportRequest` from an iterable of dictionaries.
213-
212+
Creates a `BulkImportRequest` from an iterable of dictionaries.
213+
214214
Conforms to JSON predictions format, e.g.:
215215
``{
216216
"uuid": "9fd9a92e-2560-4e77-81d4-b2e955800092",

labelbox/schema/data_row.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66

77
class DataRow(DbObject, Updateable, BulkDeletable):
8-
""" Internal Labelbox representation of a single piece of data (e.g. image, video, text).
8+
""" Internal Labelbox representation of a single piece of data (e.g. image, video, text).
99
1010
Attributes:
1111
external_id (str): User-generated file name or identifier
12-
row_data (str): Paths to local files are uploaded to Labelbox's server.
12+
row_data (str): Paths to local files are uploaded to Labelbox's server.
1313
Otherwise, it's treated as an external URL.
1414
updated_at (datetime)
1515
created_at (datetime)
16-
16+
1717
dataset (Relationship): `ToOne` relationship to Dataset
1818
created_by (Relationship): `ToOne` relationship to User
1919
organization (Relationship): `ToOne` relationship to Organization
2020
labels (Relationship): `ToMany` relationship to Label
2121
metadata (Relationship): `ToMany` relationship to AssetMetadata
22-
predictions (Relationship): `ToMany` relationship to Prediction
22+
predictions (Relationship): `ToMany` relationship to Prediction
2323
"""
2424
external_id = Field.String("external_id")
2525
row_data = Field.String("row_data")
@@ -50,7 +50,7 @@ def __init__(self, *args, **kwargs):
5050

5151
def create_metadata(self, meta_type, meta_value):
5252
""" Attaches asset metadata to a DataRow.
53-
53+
5454
>>> datarow.create_metadata("TEXT", "This is a text message")
5555
5656
Args:

labelbox/schema/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class Dataset(DbObject, Updateable, Deletable):
11-
""" A Dataset is a collection of DataRows.
11+
""" A Dataset is a collection of DataRows.
1212
1313
Attributes:
1414
name (str)
@@ -39,7 +39,7 @@ def create_data_row(self, **kwargs):
3939
>>> dataset.create_data_row(row_data="http://my_site.com/photos/img_01.jpg")
4040
4141
Args:
42-
**kwargs: Key-value arguments containing new `DataRow` data. At a minimum,
42+
**kwargs: Key-value arguments containing new `DataRow` data. At a minimum,
4343
must contain `row_data`.
4444
4545
Raises:
@@ -70,7 +70,7 @@ def create_data_rows(self, items):
7070
it is a `str`, then it is interpreted as a local file path. The file
7171
is uploaded to Labelbox and a DataRow referencing it is created.
7272
If an item is a `dict`, then it should map `DataRow` fields (or their
73-
names) to values. At the minimum an `item` passed as a `dict` must
73+
names) to values. At the minimum an `item` passed as a `dict` must
7474
contain a `DataRow.row_data` key and value.
7575
7676
>>> dataset.create_data_rows([

labelbox/schema/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Label(DbObject, Updateable, BulkDeletable):
1414
agreement (float)
1515
benchmark_agreement (float)
1616
is_benchmark_reference (bool)
17-
17+
1818
project (Relationship): `ToOne` relationship to Project
1919
data_row (Relationship): `ToOne` relationship to DataRow
2020
reviews (Relationship): `ToMany` relationship to Review

labelbox/schema/labeling_frontend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class LabelingFrontend(DbObject):
88
Represents an HTML / JavaScript UI that is used to generate
99
labels. “Editor” is the default Labeling Frontend that comes in every
1010
organization. You can create new labeling frontends for an organization.
11-
11+
1212
Attributes:
1313
name (str)
1414
description (str)

labelbox/schema/organization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
class Organization(DbObject):
66
""" An Organization is a group of Users.
7-
7+
88
It is associated with data created by Users within that Organization.
99
Typically all Users within an Organization have access to data created by any User in the same Organization.
10-
10+
1111
Attributes:
1212
updated_at (datetime)
1313
created_at (datetime)

0 commit comments

Comments
 (0)