Skip to content

Commit 9cabcc5

Browse files
committed
nit
1 parent 0ca276b commit 9cabcc5

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

labelbox/schema/project.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ def labels(self, datasets=None, order_by=None):
151151
id_param, id_param, where, order_by_str,
152152
query.results_query_part(Label))
153153

154-
return PaginatedCollection(self.client, query_str,
155-
{id_param: self.uid}, ["project", "labels"],
156-
Label)
154+
return PaginatedCollection(self.client, query_str, {id_param: self.uid},
155+
["project", "labels"], Label)
157156

158157
def export_queued_data_rows(self, timeout_seconds=120):
159158
""" Returns all data rows that are currently enqueued for this project.
@@ -394,13 +393,11 @@ def create_labeler_performance(client, result):
394393
# python isoformat doesn't accept Z as utc timezone
395394
result["lastActivityTime"] = datetime.fromisoformat(
396395
result["lastActivityTime"].replace('Z', '+00:00'))
397-
return LabelerPerformance(**{
398-
utils.snake_case(key): value
399-
for key, value in result.items()
400-
})
396+
return LabelerPerformance(
397+
**
398+
{utils.snake_case(key): value for key, value in result.items()})
401399

402-
return PaginatedCollection(self.client, query_str,
403-
{id_param: self.uid},
400+
return PaginatedCollection(self.client, query_str, {id_param: self.uid},
404401
["project", "labelerPerformance"],
405402
create_labeler_performance)
406403

@@ -412,7 +409,7 @@ def review_metrics(self, net_score):
412409
Returns:
413410
int, aggregation count of reviews for given `net_score`.
414411
"""
415-
if net_score not in (None, ) + tuple(Entity.Review.NetScore):
412+
if net_score not in (None,) + tuple(Entity.Review.NetScore):
416413
raise InvalidQueryError(
417414
"Review metrics net score must be either None "
418415
"or one of Review.NetScore values")
@@ -634,8 +631,8 @@ def unset_labeling_parameter_overrides(self, data_rows):
634631
query_str = """mutation UnsetLabelingParameterOverridesPyApi($%s: ID!){
635632
project(where: { id: $%s}) {
636633
unsetLabelingParameterOverrides(data: [%s]) { success }}}""" % (
637-
id_param, id_param, ",\n".join("{dataRowId: \"%s\"}" % row.uid
638-
for row in data_rows))
634+
id_param, id_param, ",\n".join(
635+
"{dataRowId: \"%s\"}" % row.uid for row in data_rows))
639636
res = self.client.execute(query_str, {id_param: self.uid})
640637
return res["project"]["unsetLabelingParameterOverrides"]["success"]
641638

0 commit comments

Comments
 (0)