8000 Black version updated in pipeline (#1382) · ToucanToco/botbuilder-python@13190c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 13190c4

Browse files
authored
Black version updated in pipeline (microsoft#1382)
* Update botbuilder-python-ci.yml pinned right version of black in the pipeline * black compliant * pylint compliant
1 parent 159901f commit 13190c4

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

libraries/botbuilder-ai/tests/qna/test_qna.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
# pylint: disable=protected-access
55
# pylint: disable=too-many-lines
66

7-
import json
8-
import requests
7+
import unittest
98
from os import path
109
from typing import List, Dict
11-
import unittest
1210
from unittest.mock import patch
11+
12+
import json
13+
import requests
1314
from aiohttp import ClientSession
1415

1516
import aiounittest
@@ -171,9 +172,7 @@ async def test_returns_answer_using_requests_module(self):
171172
response_path: str = "ReturnsAnswer.json"
172173
response_json = QnaApplicationTest._get_json_for_file(response_path)
173174

174-
qna = QnAMaker(
175-
endpoint=QnaApplicationTest.tests_endpoint, http_client=requests
176-
)
175+
qna = QnAMaker(endpoint=QnaApplicationTest.tests_endpoint, http_client=requests)
177176
context = QnaApplicationTest._get_context(question, TestAdapter())
178177

179178
with patch("requests.post", return_value=response_json):
@@ -185,7 +184,7 @@ async def test_returns_answer_using_requests_module(self):
185184
self.assertEqual(
186185
"BaseCamp: You can use a damp rag to clean around the Power Pack",
187186
answers[0].answer,
188-
)
187+
)
189188

190189
async def test_returns_answer_using_options(self):
191190
# Arrange
@@ -287,7 +286,7 @@ async def test_returns_answer_using_requests_module_with_no_timeout(self):
287286
context=None,
288287
qna_id=None,
289288
is_test=False,
290-
ranker_type="Default"
289+
ranker_type="Default",
291290
)
292291
response_path = "ReturnsAnswer.json"
293292
response_json = QnaApplicationTest._get_json_for_file(response_path)
@@ -296,10 +295,7 @@ async def test_returns_answer_using_requests_module_with_no_timeout(self):
296295

297296
with patch("requests.post", return_value=response_json):
298297
result = await http_request_helper.execute_http_request(
299-
url,
300-
question,
301-
QnaApplicationTest.tests_endpoint,
302-
timeout=None
298+
url, question, QnaApplicationTest.tests_endpoint, timeout=None
303299
)
304300
answers = result["answers"]
305301

@@ -308,7 +304,7 @@ async def test_returns_answer_using_requests_module_with_no_timeout(self):
308304
self.assertEqual(
309305
"BaseCamp: You can use a damp rag to clean around the Power Pack",
310306
answers[0]["answer"],
311-
)
307+
)
312308

313309
async def test_telemetry_returns_answer(self):
314310
# Arrange

libraries/botframework-connector/botframework/connector/auth/jwt_token_validation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ async def validate_claims(
167167
await auth_config.claims_validator(claims)
168168
elif SkillValidation.is_skill_claim(claims):
169169
# Skill claims must be validated using AuthenticationConfiguration claims_validator
170-
raise PermissionError("Unauthorized Access. Request is not authorized. Skill Claims require validation.")
170+
raise PermissionError(
171+
"Unauthorized Access. Request is not authorized. Skill Claims require validation."
172+
)
171173

172174
@staticmethod
173175
def is_government(channel_service: str) -> bool:

pipelines/botbuilder-python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
pip install -r ./libraries/botbuilder-ai/tests/requirements.txt
6060
pip install coveralls
6161
pip install pylint==2.4.4
62-
pip install black
62+
pip install black==19.10b0
6363
displayName: 'Install dependencies'
6464
6565
- script: |

0 commit comments

Comments
 (0)
0