[lint] Fix incorrect and inconsistent whitespace

Adjust whitespace to be consistent with the rest of the library.
This commit is contained in:
Hornwitser 2018-06-22 16:08:27 +02:00 committed by Rapptz
parent 3679819c53
commit c8b49d37be
26 changed files with 62 additions and 66 deletions

View File

@ -153,4 +153,3 @@ class GroupCall:
""" """
return self._voice_states.get(user.id) return self._voice_states.get(user.id)

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -369,10 +369,8 @@ class Client:
await self.ws.poll_event() await self.ws.poll_event()
except ResumeWebSocket: except ResumeWebSocket:
log.info('Got a request to RESUME the websocket.') log.info('Got a request to RESUME the websocket.')
coro = DiscordWebSocket.from_client(self, shard_id=self.shard_id, coro = DiscordWebSocket.from_client(self, shard_id=self.shard_id, session=self.ws.session_id,
session=self.ws.session_id, sequence=self.ws.sequence, resume=True)
sequence=self.ws.sequence,
resume=True)
self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop) self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop)
async def connect(self, *, reconnect=True): async def connect(self, *, reconnect=True):

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -38,7 +38,7 @@ from . import converter as converters
__all__ = ['Command', 'Group', 'GroupMixin', 'command', 'group', __all__ = ['Command', 'Group', 'GroupMixin', 'command', 'group',
'has_role', 'has_permissions', 'has_any_role', 'check', 'has_role', 'has_permissions', 'has_any_role', 'check',
'bot_has_role', 'bot_has_permissions', 'bot_has_any_role', 'bot_has_role', 'bot_has_permissions', 'bot_has_any_role',
'cooldown', 'guild_only', 'is_owner', 'is_nsfw', ] 'cooldown', 'guild_only', 'is_owner', 'is_nsfw']
def wrap_callback(coro): def wrap_callback(coro):
@functools.wraps(coro) @functools.wraps(coro)

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -684,5 +684,3 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol):
self._keep_alive.stop() self._keep_alive.stop()
await super().close_connection(*args, **kwargs) await super().close_connection(*args, **kwargs)

View File

@ -339,8 +339,7 @@ class HTTPClient:
return self.request(r, data=form) return self.request(r, data=form)
async def ack_message(self, channel_id, message_id): async def ack_message(self, channel_id, message_id):
r = Route('POST', '/channels/{channel_id}/messages/{message_id}/ack', channel_id=channel_id, r = Route('POST', '/channels/{channel_id}/messages/{message_id}/ack', channel_id=channel_id, message_id=message_id)
message_id=message_id)
data = await self.request(r, json={'token': self._ack_token}) data = await self.request(r, json={'token': self._ack_token})
self._ack_token = data['token'] self._ack_token = data['token']
@ -348,8 +347,7 @@ class HTTPClient:
return self.request(Route('POST', '/guilds/{guild_id}/ack', guild_id=guild_id)) return self.request(Route('POST', '/guilds/{guild_id}/ack', guild_id=guild_id))
def delete_message(self, channel_id, message_id, *, reason=None): def delete_message(self, channel_id, message_id, *, reason=None):
r = Route('DELETE', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, r = Route('DELETE', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, message_id=message_id)
message_id=message_id)
return self.request(r, reason=reason) return self.request(r, reason=reason)
def delete_messages(self, channel_id, message_ids, *, reason=None): def delete_messages(self, channel_id, message_ids, *, reason=None):
@ -361,8 +359,7 @@ class HTTPClient:
return self.request(r, json=payload, reason=reason) return self.request(r, json=payload, reason=reason)
def edit_message(self, message_id, channel_id, **fields): def edit_message(self, message_id, channel_id, **fields):
r = Route('PATCH', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, r = Route('PATCH', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, message_id=message_id)
message_id=message_id)
return self.request(r, json=fields) return self.request(r, json=fields)
def add_reaction(self, message_id, channel_id, emoji): def add_reaction(self, message_id, channel_id, emoji):

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
The MIT License (MIT) The MIT License (MIT)

View File

@ -76,10 +76,8 @@ class Shard:
await self.ws.poll_event() await self.ws.poll_event()
except ResumeWebSocket: except ResumeWebSocket:
log.info('Got a request to RESUME the websocket at Shard ID %s.', self.id) log.info('Got a request to RESUME the websocket at Shard ID %s.', self.id)
coro = DiscordWebSocket.from_client(self._client, resume=True, coro = DiscordWebSocket.from_client(self._client, resume=True, shard_id=self.id,
shard_id=self.id, session=self.ws.session_id, sequence=self.ws.sequence)
session=self.ws.session_id,
sequence=self.ws.sequence)
self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop) self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop)
def get_future(self): def get_future(self):