Exclude Nones

This commit is contained in:
Justin Spahr-Summers 2024-10-02 21:45:37 +01:00
commit 4040945cdf
No known key found for this signature in database
GPG key ID: E78498BF3C053CA7

View file

@ -48,7 +48,7 @@ async def stdio_server(
try:
async with write_stream_reader:
async for message in write_stream_reader:
json = message.model_dump_json(by_alias=True)
json = message.model_dump_json(by_alias=True, exclude_none=True)
await stdout.write(json + "\n")
await stdout.flush()
except anyio.ClosedResourceError: