Skip to content

Commit

Permalink
Fix black issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gandiddi committed Aug 26, 2024
1 parent 8d6b880 commit 2ed714b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ def __init__(
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

instance_timeout = ClientTimeout(total=opt.timeout / 1000)
self._http_client = http_client or ClientSession(timeout=instance_timeout, loop=loop)
self._http_client = http_client or ClientSession(
timeout=instance_timeout, loop=loop
)

self.telemetry_client: Union[BotTelemetryClient, NullTelemetryClient] = (
telemetry_client or NullTelemetryClient()
Expand Down
1 change: 0 additions & 1 deletion libraries/botbuilder-ai/tests/qna/test_qna.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ async def test_trace_test(self):
self._knowledge_base_id, trace_activity.value.knowledge_base_id
)


async def test_returns_answer_with_timeout(self):
question: str = "how do I clean the stove?"
options = QnAMakerOptions(timeout=999999)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,11 @@ async def _recognize_token(
)

elif OAuthPrompt._is_teams_verification_invoke(context):
code = context.activity.value.get("state", None) if context.activity.value else None
code = (
context.activity.value.get("state", None)
if context.activity.value
else None
)
try:
token = await _UserTokenAccess.get_user_token(
context, self._settings, code
Expand Down

0 comments on commit 2ed714b

Please sign in to comment.