[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] 2025-12-28 16:16:48 +00:00
parent 590f292275
commit ef3b8f4b1d
6 changed files with 53 additions and 22 deletions

View File

@ -333,7 +333,7 @@ class Music(commands.Cog):
"""Moves a track's position in the queue (e.g., !move 5 1).""" """Moves a track's position in the queue (e.g., !move 5 1)."""
player: Player = ctx.voice_client player: Player = ctx.voice_client
if not player or player.queue.is_empty: if not player or player.queue.is_empty:
return await ctx.send("The queue is empty.") return await ctx.send("The queue is empty.")
try: try:
player.queue.move(from_index - 1, to_index - 1) player.queue.move(from_index - 1, to_index - 1)
@ -371,7 +371,7 @@ class Music(commands.Cog):
"boost": pomice.Equalizer.boost(), "boost": pomice.Equalizer.boost(),
"nightcore": pomice.Timescale.nightcore(), "nightcore": pomice.Timescale.nightcore(),
"vaporwave": pomice.Timescale.vaporwave(), "vaporwave": pomice.Timescale.vaporwave(),
"bass": pomice.Equalizer.bass_boost_light() "bass": pomice.Equalizer.bass_boost_light(),
} }
if preset not in presets: if preset not in presets:

View File

@ -104,7 +104,9 @@ class IntegratedMusic(commands.Cog):
return await ctx.send("Queue is empty.") return await ctx.send("Queue is empty.")
pomice.PlaylistManager.export_queue( pomice.PlaylistManager.export_queue(
player.queue, f"playlists/{filename}", name=f"{ctx.guild.name}'s Playlist", player.queue,
f"playlists/{filename}",
name=f"{ctx.guild.name}'s Playlist",
) )
await ctx.send(f"✅ Queue exported to `playlists/{filename}`") await ctx.send(f"✅ Queue exported to `playlists/{filename}`")

View File

@ -69,6 +69,7 @@ class TrackInvalidPosition(PomiceException):
class TrackLoadError(PomiceException): class TrackLoadError(PomiceException):
"""There was an error while loading a track.""" """There was an error while loading a track."""
def __init__(self, message: str = "Sorry, I ran into trouble trying to load that track."): def __init__(self, message: str = "Sorry, I ran into trouble trying to load that track."):
super().__init__(message) super().__init__(message)
@ -111,13 +112,17 @@ class QueueException(Exception):
class QueueFull(QueueException): class QueueFull(QueueException):
"""Exception raised when attempting to add to a full Queue.""" """Exception raised when attempting to add to a full Queue."""
def __init__(self, message: str = "Whoops! The queue is completely full right now."): def __init__(self, message: str = "Whoops! The queue is completely full right now."):
super().__init__(message) super().__init__(message)
class QueueEmpty(QueueException): class QueueEmpty(QueueException):
"""Exception raised when attempting to retrieve from an empty Queue.""" """Exception raised when attempting to retrieve from an empty Queue."""
def __init__(self, message: str = "It looks like the queue is empty. There's no more music to play!"):
def __init__(
self, message: str = "It looks like the queue is empty. There's no more music to play!",
):
super().__init__(message) super().__init__(message)

View File

@ -169,9 +169,21 @@ class Equalizer(Filter):
Perfect for mainstream hits. Perfect for mainstream hits.
""" """
levels = [ levels = [
(0, -0.02), (1, -0.01), (2, 0.08), (3, 0.1), (4, 0.15), (0, -0.02),
(5, 0.1), (6, 0.05), (7, 0.0), (8, 0.0), (9, 0.0), (1, -0.01),
(10, 0.05), (11, 0.1), (12, 0.15), (13, 0.1), (14, 0.05) (2, 0.08),
(3, 0.1),
(4, 0.15),
(5, 0.1),
(6, 0.05),
(7, 0.0),
(8, 0.0),
(9, 0.0),
(10, 0.05),
(11, 0.1),
(12, 0.15),
(13, 0.1),
(14, 0.05),
] ]
return cls(tag="pop", levels=levels) return cls(tag="pop", levels=levels)
@ -181,9 +193,21 @@ class Equalizer(Filter):
Ideal for acoustic tracks or when you just want a more relaxed listening experience. Ideal for acoustic tracks or when you just want a more relaxed listening experience.
""" """
levels = [ levels = [
(0, 0.0), (1, 0.0), (2, 0.0), (3, -0.05), (4, -0.1), (0, 0.0),
(5, -0.1), (6, -0.05), (7, 0.0), (8, 0.05), (9, 0.1), (1, 0.0),
(10, 0.1), (11, 0.05), (12, 0.0), (13, 0.0), (14, 0.0) (2, 0.0),
(3, -0.05),
(4, -0.1),
(5, -0.1),
(6, -0.05),
(7, 0.0),
(8, 0.05),
(9, 0.1),
(10, 0.1),
(11, 0.05),
(12, 0.0),
(13, 0.0),
(14, 0.0),
] ]
return cls(tag="soft", levels=levels) return cls(tag="soft", levels=levels)

View File

@ -357,7 +357,7 @@ class Queue(Iterable[Track]):
Where you want to put the track. Where you want to put the track.
""" """
if from_index == to_index: if from_index == to_index:
return return
track = self._queue.pop(from_index) track = self._queue.pop(from_index)
self._queue.insert(to_index, track) self._queue.insert(to_index, track)