mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
ci/lint: apply ruff format and import sort fixes
This commit is contained in:
@@ -24,11 +24,7 @@ async def test_client_models_sorted_unique(monkeypatch: pytest.MonkeyPatch) -> N
|
||||
|
||||
@property
|
||||
def content(self) -> bytes:
|
||||
return (
|
||||
b'{"object":"list","data":['
|
||||
b'{"id":"m2"},{"id":"m1"},{"id":"m2"},{"id":""}'
|
||||
b"]}"
|
||||
)
|
||||
return b'{"object":"list","data":[{"id":"m2"},{"id":"m1"},{"id":"m2"},{"id":""}]}'
|
||||
|
||||
async def fake_get(path: str, **kwargs: object) -> _Resp:
|
||||
assert path == "/models"
|
||||
|
||||
@@ -59,10 +59,7 @@ def test_create_param_encode_omits_defaults() -> None:
|
||||
|
||||
|
||||
def test_stream_event_decode() -> None:
|
||||
raw = (
|
||||
b'{"type":"response.output_text.delta","item_id":"msg_1",'
|
||||
b'"output_index":0,"content_index":0,"delta":"hel"}'
|
||||
)
|
||||
raw = b'{"type":"response.output_text.delta","item_id":"msg_1","output_index":0,"content_index":0,"delta":"hel"}'
|
||||
event = msgspec.json.decode(raw, type=ResponseStreamEvent)
|
||||
assert event.type == "response.output_text.delta"
|
||||
assert event.delta == "hel"
|
||||
|
||||
Reference in New Issue
Block a user