[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-08-07 21:21:47 +00:00
parent 18fed3a089
commit 50b5eab860
2 changed files with 25 additions and 5 deletions

View File

@ -414,7 +414,10 @@ class Player(VoiceProtocol):
return await self._node.build_track(identifier, ctx=ctx) return await self._node.build_track(identifier, ctx=ctx)
async def get_recommendations( async def get_recommendations(
self, *, track: Track, ctx: Optional[commands.Context] = None, self,
*,
track: Track,
ctx: Optional[commands.Context] = None,
) -> Optional[Union[List[Track], Playlist]]: ) -> Optional[Union[List[Track], Playlist]]:
""" """
Gets recommendations from either YouTube or Spotify. Gets recommendations from either YouTube or Spotify.
@ -424,7 +427,12 @@ class Player(VoiceProtocol):
return await self._node.get_recommendations(track=track, ctx=ctx) return await self._node.get_recommendations(track=track, ctx=ctx)
async def connect( async def connect(
self, *, timeout: float, reconnect: bool, self_deaf: bool = False, self_mute: bool = False, self,
*,
timeout: float,
reconnect: bool,
self_deaf: bool = False,
self_mute: bool = False,
) -> None: ) -> None:
await self.guild.change_voice_state( await self.guild.change_voice_state(
channel=self.channel, channel=self.channel,
@ -475,7 +483,12 @@ class Player(VoiceProtocol):
self._log.debug("Player has been destroyed.") self._log.debug("Player has been destroyed.")
async def play( async def play(
self, track: Track, *, start: int = 0, end: int = 0, ignore_if_playing: bool = False, self,
track: Track,
*,
start: int = 0,
end: int = 0,
ignore_if_playing: bool = False,
) -> Track: ) -> Track:
"""Plays a track. If a Spotify track is passed in, it will be handled accordingly.""" """Plays a track. If a Spotify track is passed in, it will be handled accordingly."""
@ -669,7 +682,11 @@ class Player(VoiceProtocol):
return self._filters return self._filters
async def edit_filter( async def edit_filter(
self, *, filter_tag: str, edited_filter: Filter, fast_apply: bool = False, self,
*,
filter_tag: str,
edited_filter: Filter,
fast_apply: bool = False,
) -> Filters: ) -> Filters:
"""Edits a filter from the player using its filter tag and a new filter of the same type. """Edits a filter from the player using its filter tag and a new filter of the same type.
The filter to be replaced must have the same tag as the one you are replacing it with. The filter to be replaced must have the same tag as the one you are replacing it with.

View File

@ -836,7 +836,10 @@ class Node:
) )
async def get_recommendations( async def get_recommendations(
self, *, track: Track, ctx: Optional[commands.Context] = None, self,
*,
track: Track,
ctx: Optional[commands.Context] = None,
) -> Optional[Union[List[Track], Playlist]]: ) -> Optional[Union[List[Track], Playlist]]:
""" """
Gets recommendations from either YouTube or Spotify. Gets recommendations from either YouTube or Spotify.