Skip to content

Commit c778ba7

Browse files
mrobers1982claude
andcommitted
Apply ruff format to fix pre-existing lint drift
project.py, test_batch.py, and test_project.py (last touched by #2060) were not formatted per the repo's ruff config, failing `rye fmt --check` on every PR. Formatted with ruff 0.8.2 (the version bundled by CI's rye 0.43.0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 81f92d5 commit c778ba7

3 files changed

Lines changed: 17 additions & 11 deletions

File tree

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,9 +1825,9 @@ def get_overview(
18251825
variables["countInput"] = None
18261826

18271827
# Must use experimental to access "issues"
1828-
result = self.client.execute(
1829-
query, variables, experimental=True
1830-
)["project"]
1828+
result = self.client.execute(query, variables, experimental=True)[
1829+
"project"
1830+
]
18311831

18321832
# Reformat category names
18331833
overview = {

libs/labelbox/tests/integration/test_batch.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,7 @@ def test_get_overview_batch_scoped(project: Project, small_dataset: Dataset):
156156
while timeout_seconds > 0:
157157
overview_a = project.get_overview(batch_ids=[batch_a.uid])
158158
overview_b = project.get_overview(batch_ids=[batch_b.uid])
159-
if (
160-
overview_a.total_data_rows == 1
161-
and overview_b.total_data_rows == 1
162-
):
159+
if overview_a.total_data_rows == 1 and overview_b.total_data_rows == 1:
163160
break
164161
timeout_seconds -= sleep_time
165162
time.sleep(sleep_time)

libs/labelbox/tests/unit/test_project.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def _workstream_state_counts_response():
5050

5151
def test_get_overview_project_wide(project_entity):
5252
client = project_entity.client
53-
client.execute.return_value = {"project": _workstream_state_counts_response()}
53+
client.execute.return_value = {
54+
"project": _workstream_state_counts_response()
55+
}
5456

5557
overview = project_entity.get_overview()
5658

@@ -71,7 +73,9 @@ def test_get_overview_project_wide(project_entity):
7173

7274
def test_get_overview_batch_scoped(project_entity):
7375
client = project_entity.client
74-
client.execute.return_value = {"project": _workstream_state_counts_response()}
76+
client.execute.return_value = {
77+
"project": _workstream_state_counts_response()
78+
}
7579

7680
overview = project_entity.get_overview(batch_ids=["batch-1"])
7781

@@ -93,7 +97,10 @@ def test_get_overview_batch_scoped(project_entity):
9397
"batch_ids,expected_message",
9498
[
9599
([], "batch_ids filter expects a non-empty list."),
96-
(["batch-1"] * 1001, "batch_ids filter only supports a max of 1000 items."),
100+
(
101+
["batch-1"] * 1001,
102+
"batch_ids filter only supports a max of 1000 items.",
103+
),
97104
],
98105
)
99106
def test_validate_batch_ids_rejects_invalid(batch_ids, expected_message):
@@ -102,7 +109,9 @@ def test_validate_batch_ids_rejects_invalid(batch_ids, expected_message):
102109

103110

104111
def test_get_overview_rejects_empty_batch_ids(project_entity):
105-
with pytest.raises(ValueError, match="batch_ids filter expects a non-empty list."):
112+
with pytest.raises(
113+
ValueError, match="batch_ids filter expects a non-empty list."
114+
):
106115
project_entity.get_overview(batch_ids=[])
107116

108117

0 commit comments

Comments
 (0)