diff --git a/libraries/botbuilder-applicationinsights/setup.py b/libraries/botbuilder-applicationinsights/setup.py index 87855043d..edd170b60 100644 --- a/libraries/botbuilder-applicationinsights/setup.py +++ b/libraries/botbuilder-applicationinsights/setup.py @@ -13,7 +13,7 @@ TESTS_REQUIRES = [ "aiounittest==1.3.0", "django==3.2.21", # For samples - "djangorestframework==3.10.3", # For samples + "djangorestframework==3.14.0", # For samples "flask==2.2.5", # For samples ] diff --git a/libraries/botbuilder-core/botbuilder/core/teams/teams_info.py b/libraries/botbuilder-core/botbuilder/core/teams/teams_info.py index 1748aff0f..f70f6cccc 100644 --- a/libraries/botbuilder-core/botbuilder/core/teams/teams_info.py +++ b/libraries/botbuilder-core/botbuilder/core/teams/teams_info.py @@ -10,7 +10,12 @@ teams_get_meeting_info, teams_get_channel_data, ) -from botbuilder.core import CloudAdapterBase, BotFrameworkAdapter, TurnContext, BotAdapter +from botbuilder.core import ( + CloudAdapterBase, + BotFrameworkAdapter, + TurnContext, + BotAdapter, +) from botbuilder.schema import Activity, ConversationParameters, ConversationReference from botbuilder.schema.teams import ( ChannelInfo, @@ -323,7 +328,7 @@ async def _get_connector_client(turn_context: TurnContext) -> ConnectorClient: ) if connector_client is None: - raise ValueError('This method requires a connector client.') + raise ValueError("This method requires a connector client.") return connector_client diff --git a/libraries/botbuilder-core/tests/teams/test_teams_activity_handler.py b/libraries/botbuilder-core/tests/teams/test_teams_activity_handler.py index 15df4b9a2..9a1872952 100644 --- a/libraries/botbuilder-core/tests/teams/test_teams_activity_handler.py +++ b/libraries/botbuilder-core/tests/teams/test_teams_activity_handler.py @@ -592,8 +592,12 @@ async def test_on_teams_members_added_activity(self): turn_context = TurnContext(SimpleAdapter(), activity) - mock_connector_client = await SimpleAdapter.create_connector_client(self, turn_context.activity.service_url) - turn_context.turn_state[BotAdapter.BOT_CONNECTOR_CLIENT_KEY] = mock_connector_client + mock_connector_client = await SimpleAdapter.create_connector_client( + self, turn_context.activity.service_url + ) + turn_context.turn_state[ + BotAdapter.BOT_CONNECTOR_CLIENT_KEY + ] = mock_connector_client # Act bot = TestingTeamsActivityHandler() diff --git a/libraries/botbuilder-integration-applicationinsights-aiohttp/botbuilder/integration/applicationinsights/aiohttp/aiohttp_telemetry_middleware.py b/libraries/botbuilder-integration-applicationinsights-aiohttp/botbuilder/integration/applicationinsights/aiohttp/aiohttp_telemetry_middleware.py index 1a83612e6..d5dc7e2eb 100644 --- a/libraries/botbuilder-integration-applicationinsights-aiohttp/botbuilder/integration/applicationinsights/aiohttp/aiohttp_telemetry_middleware.py +++ b/libraries/botbuilder-integration-applicationinsights-aiohttp/botbuilder/integration/applicationinsights/aiohttp/aiohttp_telemetry_middleware.py @@ -19,7 +19,10 @@ def retrieve_aiohttp_body(): @middleware async def bot_telemetry_middleware(request, handler): """Process the incoming Flask request.""" - if "Content-Type" in request.headers and request.headers["Content-Type"] == "application/json": + if ( + "Content-Type" in request.headers + and request.headers["Content-Type"] == "application/json" + ): body = await request.json() _REQUEST_BODIES[current_thread().ident] = body