Apply ruff format
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
71304293324655642805a079716bea872d0fb67e- Parents
-
1a9290f - Tree
2098a97
7130429
71304293324655642805a079716bea872d0fb67e1a9290f
2098a97| Status | File | + | - |
|---|---|---|---|
| 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( | ||
| 208 | 208 | "uptime_seconds": time.monotonic() - started_at, |
| 209 | 209 | "request_count": request_count, |
| 210 | 210 | "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), | |
| 214 | 212 | "cached_backends": len(cache.loaded_keys()), |
| 215 | 213 | "max_loaded_models": cache.max_size, |
| 216 | 214 | } |
tests/unit/test_serve_app.pymodified@@ -139,9 +139,7 @@ class TestScore: | ||
| 139 | 139 | app, _cache = _make_seeded_app() |
| 140 | 140 | # Build a spec with two probes, then ask /score for one. |
| 141 | 141 | 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"]}) | |
| 145 | 143 | with TestClient(app) as client: |
| 146 | 144 | resp = client.post( |
| 147 | 145 | "/score", |
@@ -155,9 +153,7 @@ class TestScore: | ||
| 155 | 153 | def test_score_runs_all_when_probe_names_none(self) -> None: |
| 156 | 154 | app, _cache = _make_seeded_app() |
| 157 | 155 | 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"]}) | |
| 161 | 157 | with TestClient(app) as client: |
| 162 | 158 | resp = client.post("/score", json={"spec": spec}) |
| 163 | 159 | assert resp.status_code == 200, resp.text |