Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5782ae3

Browse files
committedJul 8, 2024·
style: auto fixes from pre-commit hooks
1 parent c651f7d commit 5782ae3

22 files changed

+29
-15
lines changed
 

‎docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# documentation root, use os.path.abspath to make it absolute, like shown here.
2323
sys.path.insert(0, os.path.abspath(".."))
2424
sys.path.append(os.path.abspath("extensions"))
25-
from mafic import __version__ # noqa: E402
25+
from mafic import __version__
2626

2727
project = "Mafic"
2828
copyright = "2022-present, Oliver Wilkes"
@@ -91,7 +91,7 @@
9191

9292

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

9696

9797
intersphinx_mapping = {

‎mafic/__main__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Mafic CLI tools."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/errors.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Errors raised by Mafic."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/events.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Objects for dispatched events via the client."""
2+
23
# SPDX-License-Identifier: MIT
34
# pyright: reportImportCycles=false
45
# Player import.

‎mafic/filter.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Filters that can be applied to a Player."""
2+
23
# SPDX-License-Identifier: MIT
34
# Reference to filter meanings can be found in:
45
# https://github.com/natanbc/lavadsp
@@ -616,11 +617,9 @@ class Filter:
616617
def __init__(
617618
self,
618619
*,
619-
equalizer: Equalizer
620-
| list[tuple[int, float]]
621-
| list[float]
622-
| list[EQBand]
623-
| None = None,
620+
equalizer: (
621+
Equalizer | list[tuple[int, float]] | list[float] | list[EQBand] | None
622+
) = None,
624623
karaoke: Karaoke | None = None,
625624
timescale: Timescale | None = None,
626625
tremolo: Tremolo | None = None,
@@ -644,11 +643,9 @@ def __init__(
644643

645644
def _convert_equalizer(
646645
self,
647-
equalizer: Equalizer
648-
| list[tuple[int, float]]
649-
| list[float]
650-
| list[EQBand]
651-
| None,
646+
equalizer: (
647+
Equalizer | list[tuple[int, float]] | list[float] | list[EQBand] | None
648+
),
652649
) -> Equalizer | None:
653650
if equalizer is None:
654651
return None

‎mafic/ip.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The Lavalink route planner API."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/node.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Node class to represent one Lavalink instance."""
2+
23
# SPDX-License-Identifier: MIT
34
# pyright: reportImportCycles=false
45
# Player import.

‎mafic/player.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A Player is used to connect to a channel."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/playlist.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The module containing :class:`Playlist`."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/plugin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The Lavalink plugin system."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/pool.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
r"""A module containing a :class:`NodePool`, used to manage :class:`Node`\s."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/region.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A module contains region enums for voice regions and groups."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/search_type.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Represents a search type for Lavalink."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/stats.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A module containing classes to represent node statistics."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/strategy.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The strategy system for selecting a :class:`Node` from a :class:`NodePool`."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/track.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The module containing :class:`Track`."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/type_variables.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Type variables used in mafic."""
2+
23
# SPDX-License-Identifier: MIT
34
# This was originally made to avoid the import cycle of
45
# mafic.pool -> mafic.node -> mafic.pool

‎mafic/typings/http.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ class RotatingNanoIPRouteDetails(BaseDetails):
182182
)
183183

184184

185-
class BalancingIPRouteDetails(BaseDetails):
186-
...
185+
class BalancingIPRouteDetails(BaseDetails): ...
187186

188187

189188
BalancingIPRoutePlanner = TypedDict(

‎mafic/utils/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utilities for both Mafic users and internal uses."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from .classproperty import *

‎mafic/utils/classproperty.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains a decorator to merge properties and classmethods."""
2+
23
# SPDX-License-Identifier: MIT
34

45
from __future__ import annotations

‎mafic/warnings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains the warnings shown from Mafic."""
2+
23
# SPDX-License-Identifier: MIT
34

45

‎test_bot/bot/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def before_identify_hook(
7575
# gateway-proxy
7676
return
7777

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

0 commit comments

Comments
 (0)
Please sign in to comment.