Skip to content

Commit e2c2a77

Browse files
committed
fix: apply ruff format to pre-existing formatting drift
Running 'uv run prek run --all-files --hook-stage pre-merge-commit' (per the repo's Static Checks CI step) flags two files under ui/backend/server/tests/ that were already out of sync with the pinned ruff formatter on main, unrelated to the fingerprinting change in this PR. Applying 'ruff format' fixes it; no behavior change, whitespace/line-wrap only.
1 parent d8c2b91 commit e2c2a77

2 files changed

Lines changed: 7 additions & 21 deletions

File tree

‎ui/backend/server/tests/test_db_methods/test_permissions.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,7 @@ async def test_visible_project_ids_for_user_only_returns_member_projects(db):
657657
"user_individual@no_team.com", "write"
658658
)
659659
# Project B is accessible by user B only.
660-
project_b, user_b = await _setup_project_accessible_only_by(
661-
"user_1_team_1@team1.com", "write"
662-
)
660+
project_b, user_b = await _setup_project_accessible_only_by("user_1_team_1@team1.com", "write")
663661
request_a = await _get_authenticated_request("user_individual@no_team.com")
664662
request_b = await _get_authenticated_request("user_1_team_1@team1.com")
665663
user_a_obj, teams_a = request_a.auth

‎ui/backend/server/tests/test_lifecycle/test_run_tracking.py‎

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,11 @@ async def test_get_latest_dag_runs_without_params_excludes_other_users_runs(
342342
dag_template_a, _ = await _setup_dag_template(async_client, user_a)
343343
dag_template_b, _ = await _setup_dag_template(async_client, user_b)
344344

345-
run_a_id = await _create_dag_run_via_api(
346-
async_client, user_a, dag_template_a, {"owner": "a"}
347-
)
348-
run_b_id = await _create_dag_run_via_api(
349-
async_client, user_b, dag_template_b, {"owner": "b"}
350-
)
345+
run_a_id = await _create_dag_run_via_api(async_client, user_a, dag_template_a, {"owner": "a"})
346+
run_b_id = await _create_dag_run_via_api(async_client, user_b, dag_template_b, {"owner": "b"})
351347

352348
# User A asks for latest runs with no filter -- must not see user B's run.
353-
response = await async_client.get(
354-
"/api/v1/dag_runs/latest/", headers={"test_username": user_a}
355-
)
349+
response = await async_client.get("/api/v1/dag_runs/latest/", headers={"test_username": user_a})
356350
assert response.status_code == 200, response.content
357351
returned_ids = {item["id"] for item in response.json()}
358352
assert run_a_id in returned_ids
@@ -390,17 +384,13 @@ async def test_get_latest_dag_runs_with_other_users_project_id_is_rejected(
390384

391385

392386
@pytest.mark.asyncio
393-
async def test_get_latest_dag_runs_with_own_project_id_still_works(
394-
async_client: AsyncClient, db
395-
):
387+
async def test_get_latest_dag_runs_with_own_project_id_still_works(async_client: AsyncClient, db):
396388
"""The legitimate case -- user asking for runs in a project they own --
397389
must keep returning their runs after the visibility filter is applied.
398390
"""
399391
user_a = "user_individual@no_team.com"
400392
dag_template_a, _ = await _setup_dag_template(async_client, user_a)
401-
run_id = await _create_dag_run_via_api(
402-
async_client, user_a, dag_template_a, {"owner": "a"}
403-
)
393+
run_id = await _create_dag_run_via_api(async_client, user_a, dag_template_a, {"owner": "a"})
404394

405395
# By dag_template_id.
406396
response = await async_client.get(
@@ -415,9 +405,7 @@ async def test_get_latest_dag_runs_with_own_project_id_still_works(
415405
project_a_id, *_ = await _setup_sample_project(async_client, user_a)
416406
# New template in this project, new run.
417407
dag_template_a2, _ = await _setup_dag_template(async_client, user_a)
418-
run_id_2 = await _create_dag_run_via_api(
419-
async_client, user_a, dag_template_a2, {"owner": "a2"}
420-
)
408+
run_id_2 = await _create_dag_run_via_api(async_client, user_a, dag_template_a2, {"owner": "a2"})
421409
response = await async_client.get(
422410
f"/api/v1/dag_runs/latest/?{urlencode({'project_id': project_a_id})}",
423411
headers={"test_username": user_a},

0 commit comments

Comments
 (0)