tenseleyflow/sway / 7130429

Browse files

Apply ruff format

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
71304293324655642805a079716bea872d0fb67e
Parents
1a9290f
Tree
2098a97

2 changed files

StatusFile+-
M src/dlm_sway/serve/app.py 1 3
M tests/unit/test_serve_app.py 2 6
src/dlm_sway/serve/app.pymodified
@@ -208,9 +208,7 @@ def create_app(
208208
             "uptime_seconds": time.monotonic() - started_at,
209209
             "request_count": request_count,
210210
             "total_run_seconds": total_run_seconds,
211
-            "mean_run_seconds": (
212
-                total_run_seconds / request_count if request_count > 0 else None
213
-            ),
211
+            "mean_run_seconds": (total_run_seconds / request_count if request_count > 0 else None),
214212
             "cached_backends": len(cache.loaded_keys()),
215213
             "max_loaded_models": cache.max_size,
216214
         }
tests/unit/test_serve_app.pymodified
@@ -139,9 +139,7 @@ class TestScore:
139139
         app, _cache = _make_seeded_app()
140140
         # Build a spec with two probes, then ask /score for one.
141141
         spec = _spec_payload()
142
-        spec["suite"].append(
143
-            {"name": "dk2", "kind": "delta_kl", "prompts": ["different"]}
144
-        )
142
+        spec["suite"].append({"name": "dk2", "kind": "delta_kl", "prompts": ["different"]})
145143
         with TestClient(app) as client:
146144
             resp = client.post(
147145
                 "/score",
@@ -155,9 +153,7 @@ class TestScore:
155153
     def test_score_runs_all_when_probe_names_none(self) -> None:
156154
         app, _cache = _make_seeded_app()
157155
         spec = _spec_payload()
158
-        spec["suite"].append(
159
-            {"name": "dk2", "kind": "delta_kl", "prompts": ["other"]}
160
-        )
156
+        spec["suite"].append({"name": "dk2", "kind": "delta_kl", "prompts": ["other"]})
161157
         with TestClient(app) as client:
162158
             resp = client.post("/score", json={"spec": spec})
163159
         assert resp.status_code == 200, resp.text