Skip to content

Commit

Permalink
apply code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krittick committed May 5, 2022
1 parent 934661e commit c1f93b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions discord/commands/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"""

from typing import Callable, Dict, Union

from ..permissions import Permissions
from .core import ApplicationCommand

Expand Down
5 changes: 4 additions & 1 deletion discord/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,11 @@ def from_datatype(cls, datatype):
return cls.number

from .commands.context import ApplicationContext

if not issubclass(datatype, ApplicationContext): # TODO: prevent ctx being passed here in cog commands
raise TypeError(f"Invalid class {datatype} used as an input type for an Option") # TODO: Improve the error message
raise TypeError(
f"Invalid class {datatype} used as an input type for an Option"
) # TODO: Improve the error message


class EmbeddedActivity(Enum):
Expand Down
6 changes: 3 additions & 3 deletions discord/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ def bulk_upsert_guild_commands(
return self.request(r, json=payload)

# Application commands (permissions)

def get_command_permissions(
self,
application_id: Snowflake,
Expand All @@ -2254,7 +2254,7 @@ def get_command_permissions(
guild_id=guild_id,
)
return self.request(r)

def get_guild_command_permissions(
self,
application_id: Snowflake,
Expand All @@ -2267,7 +2267,7 @@ def get_guild_command_permissions(
guild_id=guild_id,
)
return self.request(r)

# Interaction responses

def _edit_webhook_helper(
Expand Down
1 change: 0 additions & 1 deletion discord/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,6 @@ def parse_voice_state_update(self, data) -> None:
coro = voice.on_voice_state_update(data)
asyncio.create_task(logging_coroutine(coro, info="Voice Protocol voice state update handler"))


def parse_voice_server_update(self, data) -> None:
try:
key_id = int(data["guild_id"])
Expand Down

0 comments on commit c1f93b9

Please sign in to comment.