diff --git a/docs/conf.py b/docs/conf.py index 76443d6..05a5948 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 = { diff --git a/mafic/__main__.py b/mafic/__main__.py index 44f8c7e..bb03a14 100644 --- a/mafic/__main__.py +++ b/mafic/__main__.py @@ -1,4 +1,5 @@ """Mafic CLI tools.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/errors.py b/mafic/errors.py index 98e17a8..41c93f1 100644 --- a/mafic/errors.py +++ b/mafic/errors.py @@ -1,4 +1,5 @@ """Errors raised by Mafic.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/events.py b/mafic/events.py index 07f1bfd..f12beca 100644 --- a/mafic/events.py +++ b/mafic/events.py @@ -1,4 +1,5 @@ """Objects for dispatched events via the client.""" + # SPDX-License-Identifier: MIT # pyright: reportImportCycles=false # Player import. diff --git a/mafic/filter.py b/mafic/filter.py index 1fb9c3e..3ff037f 100644 --- a/mafic/filter.py +++ b/mafic/filter.py @@ -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 @@ -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, @@ -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 diff --git a/mafic/ip.py b/mafic/ip.py index 6234ebc..7317819 100644 --- a/mafic/ip.py +++ b/mafic/ip.py @@ -1,4 +1,5 @@ """The Lavalink route planner API.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/node.py b/mafic/node.py index 9e6a81d..21d1f67 100644 --- a/mafic/node.py +++ b/mafic/node.py @@ -1,4 +1,5 @@ """Node class to represent one Lavalink instance.""" + # SPDX-License-Identifier: MIT # pyright: reportImportCycles=false # Player import. diff --git a/mafic/player.py b/mafic/player.py index 278ddd2..cfdfd88 100644 --- a/mafic/player.py +++ b/mafic/player.py @@ -1,4 +1,5 @@ """A Player is used to connect to a channel.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/playlist.py b/mafic/playlist.py index 457e4fe..92c3fff 100644 --- a/mafic/playlist.py +++ b/mafic/playlist.py @@ -1,4 +1,5 @@ """The module containing :class:`Playlist`.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/plugin.py b/mafic/plugin.py index 69bc5ea..5a4f0a4 100644 --- a/mafic/plugin.py +++ b/mafic/plugin.py @@ -1,4 +1,5 @@ """The Lavalink plugin system.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/pool.py b/mafic/pool.py index a199b06..28a89ae 100644 --- a/mafic/pool.py +++ b/mafic/pool.py @@ -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 diff --git a/mafic/region.py b/mafic/region.py index 7fa8800..7b3be89 100644 --- a/mafic/region.py +++ b/mafic/region.py @@ -1,4 +1,5 @@ """A module contains region enums for voice regions and groups.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/search_type.py b/mafic/search_type.py index 7c00086..f620887 100644 --- a/mafic/search_type.py +++ b/mafic/search_type.py @@ -1,4 +1,5 @@ """Represents a search type for Lavalink.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/stats.py b/mafic/stats.py index 1714c55..809f201 100644 --- a/mafic/stats.py +++ b/mafic/stats.py @@ -1,4 +1,5 @@ """A module containing classes to represent node statistics.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/strategy.py b/mafic/strategy.py index 2436591..a3c917c 100644 --- a/mafic/strategy.py +++ b/mafic/strategy.py @@ -1,4 +1,5 @@ """The strategy system for selecting a :class:`Node` from a :class:`NodePool`.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/track.py b/mafic/track.py index c08b672..1932908 100644 --- a/mafic/track.py +++ b/mafic/track.py @@ -1,4 +1,5 @@ """The module containing :class:`Track`.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/type_variables.py b/mafic/type_variables.py index b68e11e..78b40c4 100644 --- a/mafic/type_variables.py +++ b/mafic/type_variables.py @@ -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 diff --git a/mafic/typings/http.py b/mafic/typings/http.py index fe2e074..19b8ce1 100644 --- a/mafic/typings/http.py +++ b/mafic/typings/http.py @@ -182,8 +182,7 @@ class RotatingNanoIPRouteDetails(BaseDetails): ) -class BalancingIPRouteDetails(BaseDetails): - ... +class BalancingIPRouteDetails(BaseDetails): ... BalancingIPRoutePlanner = TypedDict( diff --git a/mafic/utils/__init__.py b/mafic/utils/__init__.py index c3c97bb..c12adf6 100644 --- a/mafic/utils/__init__.py +++ b/mafic/utils/__init__.py @@ -1,4 +1,5 @@ """Utilities for both Mafic users and internal uses.""" + # SPDX-License-Identifier: MIT from .classproperty import * diff --git a/mafic/utils/classproperty.py b/mafic/utils/classproperty.py index 309c747..6fcc9e4 100644 --- a/mafic/utils/classproperty.py +++ b/mafic/utils/classproperty.py @@ -1,4 +1,5 @@ """Contains a decorator to merge properties and classmethods.""" + # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/mafic/warnings.py b/mafic/warnings.py index a7d574b..2c23620 100644 --- a/mafic/warnings.py +++ b/mafic/warnings.py @@ -1,4 +1,5 @@ """Contains the warnings shown from Mafic.""" + # SPDX-License-Identifier: MIT