Skip to content

Commit a0e2210

Browse files
author
Leo Li
committed
Resolve some lint issues
1 parent bcada21 commit a0e2210

File tree

1 file changed

+6
-4
lines changed
  • sdk/communication/azure-communication-chat/azure/communication/chat

1 file changed

+6
-4
lines changed

sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from urlparse import urlparse # type: ignore
1212

1313
from azure.core.tracing.decorator import distributed_trace
14-
from azure.core.exceptions import HttpResponseError
1514

1615
from ._chat_thread_client import ChatThreadClient
1716
from ._common import CommunicationUserCredentialPolicy
@@ -152,15 +151,18 @@ def create_chat_thread(
152151
participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access
153152
create_thread_request = CreateChatThreadRequest(topic=topic, participants=participants)
154153

155-
response, create_chat_thread_result = self._client.create_chat_thread(create_thread_request, cls=return_response, **kwargs)
154+
response, create_chat_thread_result = self._client.create_chat_thread(
155+
create_thread_request, cls=return_response, **kwargs)
156156
if response is not None:
157157
response_header = response.http_response.headers
158-
if 'Azure-Acs-InvalidParticipants' in response_header.keys() and response_header['Azure-Acs-InvalidParticipants'] is not None:
158+
if ('Azure-Acs-InvalidParticipants' in response_header.keys() and
159+
response_header['Azure-Acs-InvalidParticipants'] is not None):
159160
invalid_participant_and_reason_list = response_header['Azure-Acs-InvalidParticipants'].split('|')
160161
errors = []
161162
for invalid_participant_and_reason in invalid_participant_and_reason_list:
162163
participant, reason = invalid_participant_and_reason.split(',', 1)
163-
errors.append('participant ' + participant + ' failed to join thread ' + create_chat_thread_result.id + ' return statue code ' + reason)
164+
errors.append('participant ' + participant + ' failed to join thread '
165+
+ create_chat_thread_result.id + ' return statue code ' + reason)
164166
raise ValueError(errors)
165167
return ChatThreadClient(
166168
endpoint=self._endpoint,

0 commit comments

Comments
 (0)