8000 Update black formatting (#377) · rusty0209/botbuilder-python@793f8e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 793f8e2

Browse files
authored
Update black formatting (microsoft#377)
* Black formatting updates
1 parent 495e0cf commit 793f8e2

File tree

20 files changed

+47
-47
lines changed

20 files changed

+47
-47
lines changed

libraries/botbuilder-ai/botbuilder/ai/luis/luis_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def get_user_agent():
299299

300300
@staticmethod
301301
def recognizer_result_as_dict(
302-
recognizer_result: RecognizerResult
302+
recognizer_result: RecognizerResult,
303303
) -> Dict[str, object]:
304304
# an internal method that returns a dict for json serialization.
305305

libraries/botbuilder-ai/botbuilder/ai/qna/utils/active_learning_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ActiveLearningUtils:
1717

1818
@staticmethod
1919
def get_low_score_variation(
20-
qna_search_results: List[QueryResult]
20+
qna_search_results: List[QueryResult],
2121
) -> List[QueryResult]:
2222
"""
2323
Returns a list of QnA search results, which have low score variation.

libraries/botbuilder-azure/tests/test_blob_storage.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def test_blob_storage_write_should_add_new_value(self):
8282
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
8383
@pytest.mark.asyncio
8484
async def test_blob_storage_write_should_overwrite_when_new_e_tag_is_an_asterisk(
85-
self
85+
self,
8686
):
8787
storage = BlobStorage(BLOB_STORAGE_SETTINGS)
8888
await storage.write({"user": SimpleStoreItem()})
@@ -135,7 +135,7 @@ async def test_blob_storage_delete_should_delete_according_cached_data(self):
135135
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
136136
@pytest.mark.asyncio
137137
async def test_blob_storage_delete_should_delete_multiple_values_when_given_multiple_valid_keys(
138-
self
138+
self,
139139
):
140140
storage = BlobStorage(BLOB_STORAGE_SETTINGS)
141141
await storage.write({"test": SimpleStoreItem(), "test2": SimpleStoreItem(2)})
@@ -147,7 +147,7 @@ async def test_blob_storage_delete_should_delete_multiple_values_when_given_mult
147147
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
148148
@pytest.mark.asyncio
149149
async def test_blob_storage_delete_should_delete_values_when_given_multiple_valid_keys_and_ignore_other_data(
150-
self
150+
self,
151151
):
152152
storage = BlobStorage(BLOB_STORAGE_SETTINGS)
153153
await storage.write(
@@ -165,7 +165,7 @@ async def test_blob_storage_delete_should_delete_values_when_given_multiple_vali
165165
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
166166
@pytest.mark.asyncio
167167
async def test_blob_storage_delete_invalid_key_should_do_nothing_and_not_affect_cached_data(
168-
self
168+
self,
169169
):
170170
storage = BlobStorage(BLOB_STORAGE_SETTINGS)
171171
await storage.write({"test": SimpleStoreItem()})
@@ -179,7 +179,7 @@ async def test_blob_storage_delete_invalid_key_should_do_nothing_and_not_affect_
179179
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
180180
@pytest.mark.asyncio
181181
async def test_blob_storage_delete_invalid_keys_should_do_nothing_and_not_affect_cached_data(
182-
self
182+
self,
183183
):
184184
storage = BlobStorage(BLOB_STORAGE_SETTINGS)
185185
await storage.write({"test": SimpleStoreItem()})

libraries/botbuilder-azure/tests/test_cosmos_storage.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def reset():
2727

2828

2929
def get_mock_client(identifier: str = "1"):
30-
# pylint: disable=invalid-name
30+
# pylint: disable=attribute-defined-outside-init, invalid-name
3131
mock = MockClient()
3232

3333
mock.QueryDatabases = Mock(return_value=[])
@@ -159,7 +159,7 @@ async def test_cosmos_storage_write_should_add_new_value(self):
159159
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
160160
@pytest.mark.asyncio
161161
async def test_cosmos_storage_write_should_overwrite_when_new_e_tag_is_an_asterisk(
162-
self
162+
self,
163163
):
164164
await reset()
165165
storage = CosmosDbStorage(COSMOS_DB_CONFIG)
@@ -228,7 +228,7 @@ async def test_cosmos_storage_delete_should_delete_according_cached_data(self):
228228
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
229229
@pytest.mark.asyncio
230230
async def test_cosmos_storage_delete_should_delete_multiple_values_when_given_multiple_valid_keys(
231-
self
231+
self,
232232
):
233233
await reset()
234234
storage = CosmosDbStorage(COSMOS_DB_CONFIG)
@@ -241,7 +241,7 @@ async def test_cosmos_storage_delete_should_delete_multiple_values_when_given_mu
241241
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
242242
@pytest.mark.asyncio
243243
async def test_cosmos_storage_delete_should_delete_values_when_given_multiple_valid_keys_and_ignore_other_data(
244-
self
244+
self,
245245
):
246246
await reset()
247247
storage = CosmosDbStorage(COSMOS_DB_CONFIG)
@@ -260,7 +260,7 @@ async def test_cosmos_storage_delete_should_delete_values_when_given_multiple_va
260260
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
261261
@pytest.mark.asyncio
262262
async def test_cosmos_storage_delete_invalid_key_should_do_nothing_and_not_affect_cached_data(
263-
self
263+
self,
264264
):
265265
await reset()
266266
storage = CosmosDbStorage(COSMOS_DB_CONFIG)
@@ -275,7 +275,7 @@ async def test_cosmos_storage_delete_invalid_key_should_do_nothing_and_not_affec
275275
@pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.")
276276
@pytest.mark.asyncio
277277
async def test_cosmos_storage_delete_invalid_keys_should_do_nothing_and_not_affect_cached_data(
278-
self
278+
self,
279279
):
280280
await reset()
281281
storage = CosmosDbStorage(COSMOS_DB_CONFIG)

libraries/botbuilder-azure/tests/test_key_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_should_not_truncate_short_key(self):
6565
assert len(fixed2) == 16, "short key was truncated improperly"
6666

6767
def test_should_create_sufficiently_different_truncated_keys_of_similar_origin(
68-
self
68+
self,
6969
):
7070
# create 2 very similar extra long key where the difference will definitely be trimmed off by truncate function
7171
long_key = "x" * 300 + "1"

libraries/botbuilder-core/botbuilder/core/inspection/trace_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def from_state(bot_state: Union[BotState, Dict]) -> Activity:
4242

4343

4444
def from_conversation_reference(
45-
conversation_reference: ConversationReference
45+
conversation_reference: ConversationReference,
4646
) -> Activity:
4747
return Activity(
4848
type=ActivityTypes.trace,

libraries/botbuilder-core/tests/test_auto_save_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def test_should_support_plugins_passed_to_constructor(self):
107107
assert foo_state.write_called, "save_all_changes() not called."
108108

109109
async def test_should_not_add_any_bot_state_on_construction_if_none_are_passed_in(
110-
self
110+
self,
111111
):
112112
middleware = AutoSaveStateMiddleware()
113113
assert (

libraries/botbuilder-core/tests/test_bot_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_adapter_use_chaining(self):
3030

3131
async def test_pass_resource_responses_through(self):
3232
def validate_responses( # pylint: disable=unused-argument
33-
activities: List[Activity]
33+
activities: List[Activity],
3434
):
3535
pass # no need to do anything.
3636

libraries/botbuilder-core/tests/test_inspection_middleware.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def aux_func(context: TurnContext):
3737
assert outbound_activity.text, "hi"
3838

3939
async def test_should_replicate_activity_data_to_listening_emulator_following_open_and_attach(
40-
self
40+
self,
4141
):
4242
inbound_expectation, outbound_expectation, state_expectation = (
4343
False,
@@ -147,7 +147,7 @@ async def exec_test2(turn_context):
147147
assert mocker.call_count, 3
148148

149149
async def test_should_replicate_activity_data_to_listening_emulator_following_open_and_attach_with_at_mention(
150-
self
150+
self,
151151
):
152152
inbound_expectation, outbound_expectation, state_expectation = (
153153
False,

libraries/botbuilder-core/tests/test_memory_storage.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_memory_storage__e_tag_should_start_at_0(self):
2424
assert storage._e_tag == 0 # pylint: disable=protected-access
2525

2626
async def test_memory_storage_initialized_with_memory_should_have_accessible_data(
27-
self
27+
self,
2828
):
2929
storage = MemoryStorage({"test": SimpleStoreItem()})
3030
data = await storage.read(["test"])
@@ -53,7 +53,7 @@ async def test_memory_storage_write_should_add_new_value(self):
5353
assert data["user"].counter == 1
5454

5555
async def test_memory_storage_write_should_overwrite_when_new_e_tag_is_an_asterisk_1(
56-
self
56+
self,
5757
):
5858
storage = MemoryStorage()
5959
await storage.write({"user": SimpleStoreItem(e_tag="1")})
@@ -63,7 +63,7 @@ async def test_memory_storage_write_should_overwrite_when_new_e_tag_is_an_asteri
6363
assert data["user"].counter == 10
6464

6565
async def test_memory_storage_write_should_overwrite_when_new_e_tag_is_an_asterisk_2(
66-
self
66+
self,
6767
):
6868
storage = MemoryStorage()
6969
await storage.write({"user": SimpleStoreItem(e_tag="1")})
@@ -92,7 +92,7 @@ async def test_memory_storage_delete_should_delete_according_cached_data(self):
9292
assert not data.keys()
9393

9494
async def test_memory_storage_delete_should_delete_multiple_values_when_given_multiple_valid_keys(
95-
self
95+
self,
9696
):
9797
storage = MemoryStorage(
9898
{"test": SimpleStoreItem(), "test2": SimpleStoreItem(2, "2")}
@@ -103,7 +103,7 @@ async def test_memory_storage_delete_should_delete_multiple_values_when_given_mu
103103
assert not data.keys()
104104

105105
async def test_memory_storage_delete_should_delete_values_when_given_multiple_valid_keys_and_ignore_other_data(
106-
self
106+
self,
107107
):
108108
storage = MemoryStorage(
109109
{
@@ -118,7 +118,7 @@ async def test_memory_storage_delete_should_delete_values_when_given_multiple_va
118118
assert len(data.keys()) == 1
119119

120120
async def test_memory_storage_delete_invalid_key_should_do_nothing_and_not_affect_cached_data(
121-
self
121+
self,
122122
):
123123
storage = MemoryStorage({"test": "test"})
124124

@@ -129,7 +129,7 @@ async def test_memory_storage_delete_invalid_key_should_do_nothing_and_not_affec
129129
assert not data.keys()
130130

131131
async def test_memory_storage_delete_invalid_keys_should_do_nothing_and_not_affect_cached_data(
132-
self
132+
self,
133133
):
134134
storage = MemoryStorage({"test": "test"})
135135

0 commit comments

Comments
 (0)
0