Skip to content

Commit

Permalink
style: auto fixes from pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 11, 2024
1 parent c217666 commit 1a064fb
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(".."))
sys.path.append(os.path.abspath("extensions"))
from mafic import __version__ # noqa: E402
from mafic import __version__

project = "Mafic"
copyright = "2022-present, Oliver Wilkes"
Expand Down Expand Up @@ -91,7 +91,7 @@


def typehints_formatter(annotation: Any, _: Config) -> str | None: # noqa: ANN401
return aliases.get(annotation, None)
return aliases.get(annotation)


intersphinx_mapping = {
Expand Down
1 change: 1 addition & 0 deletions mafic/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Mafic CLI tools."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Errors raised by Mafic."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Objects for dispatched events via the client."""

# SPDX-License-Identifier: MIT
# pyright: reportImportCycles=false
# Player import.
Expand Down
17 changes: 7 additions & 10 deletions mafic/filter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Filters that can be applied to a Player."""

# SPDX-License-Identifier: MIT
# Reference to filter meanings can be found in:
# https://github.com/natanbc/lavadsp
Expand Down Expand Up @@ -616,11 +617,9 @@ class Filter:
def __init__(
self,
*,
equalizer: Equalizer
| list[tuple[int, float]]
| list[float]
| list[EQBand]
| None = None,
equalizer: (
Equalizer | list[tuple[int, float]] | list[float] | list[EQBand] | None
) = None,
karaoke: Karaoke | None = None,
timescale: Timescale | None = None,
tremolo: Tremolo | None = None,
Expand All @@ -644,11 +643,9 @@ def __init__(

def _convert_equalizer(
self,
equalizer: Equalizer
| list[tuple[int, float]]
| list[float]
| list[EQBand]
| None,
equalizer: (
Equalizer | list[tuple[int, float]] | list[float] | list[EQBand] | None
),
) -> Equalizer | None:
if equalizer is None:
return None
Expand Down
1 change: 1 addition & 0 deletions mafic/ip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Lavalink route planner API."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Node class to represent one Lavalink instance."""

# SPDX-License-Identifier: MIT
# pyright: reportImportCycles=false
# Player import.
Expand Down
1 change: 1 addition & 0 deletions mafic/player.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A Player is used to connect to a channel."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/playlist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The module containing :class:`Playlist`."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Lavalink plugin system."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/pool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
r"""A module containing a :class:`NodePool`, used to manage :class:`Node`\s."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/region.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A module contains region enums for voice regions and groups."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/search_type.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Represents a search type for Lavalink."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A module containing classes to represent node statistics."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/strategy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The strategy system for selecting a :class:`Node` from a :class:`NodePool`."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/track.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The module containing :class:`Track`."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/type_variables.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type variables used in mafic."""

# SPDX-License-Identifier: MIT
# This was originally made to avoid the import cycle of
# mafic.pool -> mafic.node -> mafic.pool
Expand Down
3 changes: 1 addition & 2 deletions mafic/typings/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ class RotatingNanoIPRouteDetails(BaseDetails):
)


class BalancingIPRouteDetails(BaseDetails):
...
class BalancingIPRouteDetails(BaseDetails): ...


BalancingIPRoutePlanner = TypedDict(
Expand Down
1 change: 1 addition & 0 deletions mafic/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for both Mafic users and internal uses."""

# SPDX-License-Identifier: MIT

from .classproperty import *
1 change: 1 addition & 0 deletions mafic/utils/classproperty.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains a decorator to merge properties and classmethods."""

# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions mafic/warnings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the warnings shown from Mafic."""

# SPDX-License-Identifier: MIT


Expand Down
2 changes: 1 addition & 1 deletion test_bot/bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def before_identify_hook(
# gateway-proxy
return

async def add_nodes(self) -> None: # noqa: PLR0912
async def add_nodes(self) -> None:
with open(environ["LAVALINK_FILE"], "rb") as f:
data: list[LavalinkInfo] = orjson.loads(f.read())

Expand Down

0 comments on commit 1a064fb

Please sign in to comment.