Skip to content

Commit bee67f7

Browse files
committed
fixing pylint
1 parent b0dcb07 commit bee67f7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# ---------------------------------------------------------
4-
# pylint: disable=logging-fstring-interpolation,no-name-in-module
4+
# pylint: disable=logging-fstring-interpolation,no-name-in-module,no-member
55
from __future__ import annotations
66

77
import os
@@ -239,7 +239,9 @@ async def stream_updates():
239239
# logger.debug("Agent streaming iterator finished (StopAsyncIteration)")
240240
# break
241241
# except asyncio.TimeoutError:
242-
# logger.warning("Streaming idle timeout reached (%.1fs); terminating stream.", timeout_s)
242+
# logger.warning(
243+
# "Streaming idle timeout reached (%.1fs); terminating stream.", timeout_s
244+
# )
243245
# for ev in streaming_converter.completion_events():
244246
# yield ev
245247
# return

sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_streaming_converter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,15 @@ async def convert_contents(self, contents: AsyncIterable[FunctionResultContent])
228228
def _to_output(cls, result: Any) -> str:
229229
if isinstance(result, str):
230230
return result
231-
elif isinstance(result, list):
231+
if isinstance(result, list):
232232
text = []
233233
for item in result:
234234
if isinstance(item, BaseContent):
235235
text.append(item.to_dict())
236236
else:
237237
text.append(str(item))
238238
return json.dumps(text)
239-
else:
240-
return ""
239+
return ""
241240

242241

243242
class AgentFrameworkOutputStreamingConverter:
@@ -281,7 +280,9 @@ async def convert(self, updates: AsyncIterable[AgentRunResponseUpdate]) -> Async
281280
response=created_response,
282281
)
283282

284-
is_changed = lambda a, b: a is not None and b is not None and a.message_id != b.message_id
283+
is_changed = (
284+
lambda a, b: a is not None and b is not None and a.message_id != b.message_id
285+
)
285286
async for group in chunk_on_change(updates, is_changed):
286287
has_value, first, contents = await peek(self._read_updates(group))
287288
if not has_value:

0 commit comments

Comments
 (0)