Skip to content

Commit 652f655

Browse files
committed
Fix black failures
1 parent 624fb05 commit 652f655

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

mmpy_bot/driver.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class Driver(mattermostautodriver.Driver):
1616
username: str = ""
1717

1818
def __init__(self, *args, num_threads=10, **kwargs):
19-
"""Wrapper around the mattermostautodriver Driver with some convenience functions
20-
and attributes.
19+
"""Wrapper around the mattermostautodriver Driver with some convenience
20+
functions and attributes.
2121
2222
Arguments:
2323
- num_threads: int, number of threads to use for the default worker threadpool.
@@ -78,7 +78,9 @@ def create_post(
7878
return self.posts.create_post(post)
7979

8080
def get_thread(self, post_id: str):
81-
warnings.warn("get_thread is deprecated. Use get_post_thread instead", DeprecationWarning)
81+
warnings.warn(
82+
"get_thread is deprecated. Use get_post_thread instead", DeprecationWarning
83+
)
8284
return self.get_post_thread(post_id)
8385

8486
def get_post_thread(self, post_id: str):
@@ -163,9 +165,9 @@ def direct_message(
163165
):
164166
# Private/direct messages are sent to a special channel that
165167
# includes the bot and the recipient
166-
direct_id = self.channels.create_direct_channel(
167-
[self.user_id, receiver_id]
168-
)["id"]
168+
direct_id = self.channels.create_direct_channel([self.user_id, receiver_id])[
169+
"id"
170+
]
169171

170172
return self.create_post(
171173
channel_id=direct_id,

tests/integration_tests/test_direct_message_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def bot_and_user_direct_channel(channel):
4141
# which is implemented by mattermost as a channel
4242
driver.create_post(OFF_TOPIC_ID, trigger)
4343

44-
user_channels = driver.channels.get_channels_for_team_for_user(driver.user_id, TEAM_ID)
44+
user_channels = driver.channels.get_channels_for_team_for_user(
45+
driver.user_id, TEAM_ID
46+
)
4547
channels = list(filter(bot_and_user_direct_channel, user_channels))
4648

4749
# We need to wait for the reply to be processed by mattermost

0 commit comments

Comments
 (0)