@@ -115,11 +115,7 @@ async def stdio_client(server: StdioServerParameters, errlog: TextIO = sys.stder
115115 process = await _create_platform_compatible_process (
116116 command = command ,
117117 args = server .args ,
118- env = (
119- {** get_default_environment (), ** server .env }
120- if server .env is not None
121- else get_default_environment ()
122- ),
118+ env = ({** get_default_environment (), ** server .env } if server .env is not None else get_default_environment ()),
123119 errlog = errlog ,
124120 cwd = server .cwd ,
125121 )
@@ -163,9 +159,7 @@ async def stdin_writer():
163159 try :
164160 async with write_stream_reader :
165161 async for session_message in write_stream_reader :
166- json = session_message .message .model_dump_json (
167- by_alias = True , exclude_none = True
168- )
162+ json = session_message .message .model_dump_json (by_alias = True , exclude_none = True )
169163 await process .stdin .send (
170164 (json + "\n " ).encode (
171165 encoding = server .encoding ,
@@ -246,8 +240,6 @@ async def _create_platform_compatible_process(
246240 if sys .platform == "win32" :
247241 process = await create_windows_process (command , args , env , errlog , cwd )
248242 else :
249- process = await anyio .open_process (
250- [command , * args ], env = env , stderr = errlog , cwd = cwd
251- )
243+ process = await anyio .open_process ([command , * args ], env = env , stderr = errlog , cwd = cwd )
252244
253245 return process
0 commit comments