From 9578df064376ebca2272f7e3664b5ee15ebbcbc4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:22:19 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.12.0 → 26.5.1](https://github.com/psf/black-pre-commit-mirror/compare/23.12.0...26.5.1) - [github.com/astral-sh/ruff-pre-commit: v0.1.8 → v0.15.17](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.8...v0.15.17) - [github.com/ariebovenberg/slotscheck: v0.17.1 → v0.20.0](https://github.com/ariebovenberg/slotscheck/compare/v0.17.1...v0.20.0) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v6.0.0) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35b1555..45dc64e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,21 +4,21 @@ ci: autofix_commit_msg: | style: auto fixes from pre-commit hooks repos: - - repo: https://github.com/psf/black - rev: 23.12.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.1 hooks: - id: black name: Running black in all files. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.8 + rev: v0.15.17 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] name: Running ruff in all files. - repo: https://github.com/ariebovenberg/slotscheck - rev: v0.17.1 + rev: v0.20.0 hooks: - id: slotscheck name: Running slotscheck in all files. @@ -26,7 +26,7 @@ repos: additional_dependencies: [nextcord, aiohttp] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-ast name: Check if python files are valid syntax for the ast parser From 9e56897dd29c36d5c7b22eeef6850173006331f6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:22:31 +0000 Subject: [PATCH 2/2] style: auto fixes from pre-commit hooks --- docs/conf.py | 4 ++-- mafic/__libraries.py | 6 +++--- mafic/__main__.py | 1 + mafic/errors.py | 1 + mafic/events.py | 11 ++++++----- mafic/filter.py | 25 +++++++++++-------------- mafic/ip.py | 11 ++++++----- mafic/node.py | 21 +++++++++++---------- mafic/player.py | 11 ++++++----- mafic/playlist.py | 1 + mafic/plugin.py | 1 + mafic/pool.py | 1 + mafic/region.py | 1 + mafic/search_type.py | 1 + mafic/stats.py | 7 ++++--- mafic/strategy.py | 5 +++-- mafic/track.py | 3 ++- mafic/type_variables.py | 1 + mafic/typings/common.py | 12 ++++++------ mafic/typings/http.py | 36 +++++++++++++++++------------------- mafic/typings/incoming.py | 2 +- mafic/typings/misc.py | 2 +- mafic/typings/outgoing.py | 2 +- mafic/utils/__init__.py | 1 + mafic/utils/classproperty.py | 3 ++- mafic/warnings.py | 3 ++- 26 files changed, 93 insertions(+), 80 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 76443d6..32c8f04 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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" @@ -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/__libraries.py b/mafic/__libraries.py index b3e9566..1caa5b6 100644 --- a/mafic/__libraries.py +++ b/mafic/__libraries.py @@ -10,13 +10,13 @@ from .errors import MultipleCompatibleLibraries, NoCompatibleLibraries __all__ = ( + "MISSING", "Client", "Connectable", "ExponentialBackoff", "Guild", "GuildChannel", "GuildVoiceStatePayload", - "MISSING", "StageChannel", "VoiceChannel", "VoiceProtocol", @@ -138,8 +138,8 @@ if TYPE_CHECKING: from discord.types.voice import ( - GuildVoiceState as GuildVoiceStatePayload, # noqa: TCH004 - VoiceServerUpdate as VoiceServerUpdatePayload, # noqa: TCH004 + GuildVoiceState as GuildVoiceStatePayload, # noqa: TC004 + VoiceServerUpdate as VoiceServerUpdatePayload, # noqa: TC004 ) 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..d9bf39e 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. @@ -71,7 +72,7 @@ class WebSocketClosedEvent(Generic[PlayerT]): The player that the event was dispatched from. """ - __slots__ = ("code", "reason", "by_discord", "player") + __slots__ = ("by_discord", "code", "player", "reason") def __init__( self, *, payload: WebSocketClosedEventPayload, player: PlayerT @@ -100,7 +101,7 @@ class TrackStartEvent(Generic[PlayerT]): The player that the event was dispatched from. """ - __slots__ = ("track", "player") + __slots__ = ("player", "track") def __init__(self, *, track: Track, player: PlayerT) -> None: self.track: Track = track @@ -124,7 +125,7 @@ class TrackEndEvent(Generic[PlayerT]): The player that the event was dispatched from. """ - __slots__ = ("track", "reason", "player") + __slots__ = ("player", "reason", "track") def __init__( self, *, track: Track, payload: TrackEndEventPayload, player: PlayerT @@ -157,7 +158,7 @@ class TrackExceptionEvent(Generic[PlayerT]): The player that the event was dispatched from. """ - __slots__ = ("track", "exception", "player") + __slots__ = ("exception", "player", "track") def __init__( self, @@ -190,7 +191,7 @@ class TrackStuckEvent(Generic[PlayerT]): The player that the event was dispatched from. """ - __slots__ = ("track", "threshold_ms", "player") + __slots__ = ("player", "threshold_ms", "track") def __init__( self, *, track: Track, payload: TrackStuckEventPayload, player: PlayerT diff --git a/mafic/filter.py b/mafic/filter.py index 1fb9c3e..6c31c57 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 @@ -601,26 +602,24 @@ class Filter: """ __slots__ = ( + "channel_mix", + "distortion", "equalizer", "karaoke", + "low_pass", + "rotation", "timescale", "tremolo", "vibrato", - "rotation", - "distortion", - "channel_mix", - "low_pass", "volume", ) 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..d2c9aeb 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 @@ -20,12 +21,12 @@ ) __all__ = ( - "IPRoutePlannerType", - "IPBlockType", - "IPBlock", - "FailingAddress", - "BaseIPRoutePlannerStatus", "BalancingIPRoutePlannerStatus", + "BaseIPRoutePlannerStatus", + "FailingAddress", + "IPBlock", + "IPBlockType", + "IPRoutePlannerType", "NanoIPRoutePlannerStatus", "RotatingIPRoutePlannerStatus", "RotatingNanoIPRoutePlannerStatus", diff --git a/mafic/node.py b/mafic/node.py index 3a46229..f6a8c16 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. @@ -178,25 +179,25 @@ class Node(Generic[ClientT]): "_checked_version", "_client", "_connect_task", + "_event_queue", "_heartbeat", "_host", "_label", "_msg_tasks", "_players", "_port", - "_resume_key", - "_secure", - "_timeout", "_ready", "_rest_uri", + "_resume_key", "_resuming_session_id", + "_secure", "_session_id", "_stats", + "_timeout", "_version", "_ws", - "_ws_uri", "_ws_task", - "_event_queue", + "_ws_uri", "regions", "shard_ids", ) @@ -858,7 +859,7 @@ async def _handle_msg(self, data: IncomingMessage) -> None: self._ready.set() else: # Of course pyright considers this to be `Never`, so this is to keep types. - op = cast(str, data["op"]) + op = cast("str", data["op"]) _log.warn("Unknown incoming message op code %s", op) async def _handle_event(self, data: EventPayload) -> None: @@ -1272,17 +1273,17 @@ async def fetch_route_planner_status(self) -> RoutePlannerStatus | None: if data["class"] == "RotatingIpRoutePlanner": return RotatingIPRoutePlannerStatus( - cast(RotatingIPRouteDetails, data["details"]) + cast("RotatingIPRouteDetails", data["details"]) ) elif data["class"] == "NanoIpRoutePlanner": - return NanoIPRoutePlannerStatus(cast(NanoIPRouteDetails, data["details"])) + return NanoIPRoutePlannerStatus(cast("NanoIPRouteDetails", data["details"])) elif data["class"] == "RotatingNanoIpRoutePlanner": return RotatingNanoIPRoutePlannerStatus( - cast(RotatingNanoIPRouteDetails, data["details"]) + cast("RotatingNanoIPRouteDetails", data["details"]) ) elif data["class"] == "BalancingIpRoutePlanner": return BalancingIPRoutePlannerStatus( - cast(BalancingIPRouteDetails, data["details"]) + cast("BalancingIPRouteDetails", data["details"]) ) elif data["class"] is None: return None diff --git a/mafic/player.py b/mafic/player.py index 03f4cc9..a3d0b7e 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 @@ -260,7 +261,7 @@ def dispatch_event(self, data: EventPayload) -> None: track = ( self._current if self.node.version == 3 - else Track.from_data_with_info(cast(TrackWithInfo, data.get("track"))) + else Track.from_data_with_info(cast("TrackWithInfo", data.get("track"))) ) if track is None: @@ -277,7 +278,7 @@ def dispatch_event(self, data: EventPayload) -> None: track = ( self._last_track if self.node.version == 3 - else Track.from_data_with_info(cast(TrackWithInfo, data.get("track"))) + else Track.from_data_with_info(cast("TrackWithInfo", data.get("track"))) ) if track is None: @@ -296,7 +297,7 @@ def dispatch_event(self, data: EventPayload) -> None: track = ( self._current if self.node.version == 3 - else Track.from_data_with_info(cast(TrackWithInfo, data.get("track"))) + else Track.from_data_with_info(cast("TrackWithInfo", data.get("track"))) ) if track is None: @@ -313,7 +314,7 @@ def dispatch_event(self, data: EventPayload) -> None: track = ( self._current if self.node.version == 3 - else Track.from_data_with_info(cast(TrackWithInfo, data.get("track"))) + else Track.from_data_with_info(cast("TrackWithInfo", data.get("track"))) ) if track is None: @@ -329,7 +330,7 @@ def dispatch_event(self, data: EventPayload) -> None: # Pyright expects this to never happen, so do I, I really hope. # Nobody expects the Spanish Inquisition, neither does pyright. - event_type = cast(str, data["type"]) + event_type = cast("str", data["type"]) _log.warning("Unknown incoming event type %s", event_type) async def on_voice_state_update( # pyright: ignore[reportIncompatibleMethodOverride] 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 6cce62a..b1e6c94 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..267b6b5 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 @@ -31,7 +32,7 @@ class CPUStats: The load Lavalink is using. """ - __slots__ = ("cores", "system_load", "lavalink_load") + __slots__ = ("cores", "lavalink_load", "system_load") def __init__(self, payload: CPU) -> None: self.cores: int = payload["cores"] @@ -54,7 +55,7 @@ class MemoryStats: The amount of reservable memory for the node. Set by ``-Xmx`` for Java. """ - __slots__ = ("free", "used", "allocated", "reservable") + __slots__ = ("allocated", "free", "reservable", "used") def __init__(self, payload: Memory) -> None: self.free: int = payload["free"] @@ -76,7 +77,7 @@ class FrameStats: The amount of frames deficit. """ - __slots__ = ("sent", "nulled", "deficit") + __slots__ = ("deficit", "nulled", "sent") def __init__(self, payload: FrameStatsPayload) -> None: self.sent: int = payload["sent"] diff --git a/mafic/strategy.py b/mafic/strategy.py index 2436591..2dda1b3 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 @@ -8,14 +9,14 @@ from enum import Enum, auto from logging import getLogger from random import choice -from typing import List, Optional +from typing import List from .node import Node from .region import VoiceRegion from .type_variables import ClientT StrategyCallable = Callable[ - [List[Node[ClientT]], int, Optional[int], Optional[str]], List[Node[ClientT]] + [List[Node[ClientT]], int, int | None, str | None], List[Node[ClientT]] ] """Represents a strategy callable. diff --git a/mafic/track.py b/mafic/track.py index c08b672..19a6e8a 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 @@ -72,8 +73,8 @@ class Track: """ __slots__ = ( - "author", "artwork_url", + "author", "id", "identifier", "isrc", 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/common.py b/mafic/typings/common.py index 9abd366..1a9cd71 100644 --- a/mafic/typings/common.py +++ b/mafic/typings/common.py @@ -10,16 +10,20 @@ from typing_extensions import NotRequired __all__ = ( - "Filters", + "CPU", "ChannelMix", - "EQBand", "Distortion", + "EQBand", + "Filters", "Filters", + "FrameStats", "Karaoke", "LowPass", + "Memory", "Player", "PlaylistInfo", "Rotation", + "Stats", "Timescale", "TrackInfo", "TrackWithInfo", @@ -27,10 +31,6 @@ "Vibrato", "VoiceState", "VoiceStateRequest", - "Memory", - "CPU", - "FrameStats", - "Stats", ) diff --git a/mafic/typings/http.py b/mafic/typings/http.py index fe2e074..aba3403 100644 --- a/mafic/typings/http.py +++ b/mafic/typings/http.py @@ -1,10 +1,9 @@ # SPDX-License-Identifier: MIT -# ruff: noqa: UP013 # `class` in `TypedDict` does not work as that is a reserved keyword from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, TypedDict, Union +from typing import TYPE_CHECKING, Any, Literal, TypedDict, Union if TYPE_CHECKING: from typing_extensions import NotRequired @@ -16,36 +15,36 @@ __all__ = ( "BalancingIPRouteDetails", "BalancingIPRoutePlanner", + "BalancingIPRoutePlanner", "BaseDetails", "ConfigureResumingResponse", - "FailingIPAddress", + "EmptyRoutePlanner", "EmptyRoutePlanner", "Error", + "FailingIPAddress", "GenericTracks", "Git", + "Git", "IPBlock", "Info", + "Info", "NanoIPRouteDetails", "NanoIPRoutePlanner", + "NanoIPRoutePlanner", "NoMatches", "PlaylistTracks", "PluginData", "RotatingIPRouteDetails", "RotatingIPRoutePlanner", + "RotatingIPRoutePlanner", "RotatingNanoIPRouteDetails", "RotatingNanoIPRoutePlanner", + "RotatingNanoIPRoutePlanner", + "RoutePlannerStatus", "RoutePlannerStatus", "TrackLoadingResult", "TracksFailed", "Version", - "Git", - "Info", - "RotatingIPRoutePlanner", - "NanoIPRoutePlanner", - "RotatingNanoIPRoutePlanner", - "BalancingIPRoutePlanner", - "EmptyRoutePlanner", - "RoutePlannerStatus", ) @@ -162,8 +161,8 @@ class NanoIPRouteDetails(BaseDetails): NanoIPRoutePlanner = TypedDict( "NanoIPRoutePlanner", { - "class": Optional[Literal["NanoIpRoutePlanner"]], - "details": Optional[NanoIPRouteDetails], + "class": Literal["NanoIpRoutePlanner"] | None, + "details": NanoIPRouteDetails | None, }, ) @@ -176,21 +175,20 @@ class RotatingNanoIPRouteDetails(BaseDetails): RotatingNanoIPRoutePlanner = TypedDict( "RotatingNanoIPRoutePlanner", { - "class": Optional[Literal["RotatingNanoIpRoutePlanner"]], - "details": Optional[RotatingNanoIPRouteDetails], + "class": Literal["RotatingNanoIpRoutePlanner"] | None, + "details": RotatingNanoIPRouteDetails | None, }, ) -class BalancingIPRouteDetails(BaseDetails): - ... +class BalancingIPRouteDetails(BaseDetails): ... BalancingIPRoutePlanner = TypedDict( "BalancingIPRoutePlanner", { - "class": Optional[Literal["BalancingIpRoutePlanner"]], - "details": Optional[BalancingIPRouteDetails], + "class": Literal["BalancingIpRoutePlanner"] | None, + "details": BalancingIPRouteDetails | None, }, ) diff --git a/mafic/typings/incoming.py b/mafic/typings/incoming.py index 18bf5aa..5cfa2e2 100644 --- a/mafic/typings/incoming.py +++ b/mafic/typings/incoming.py @@ -16,9 +16,9 @@ __all__ = ( "EventPayload", + "IncomingMessage", "PlayerUpdatePayload", "PlayerUpdateState", - "IncomingMessage", "TrackEndEvent", "TrackExceptionEvent", "TrackStartEvent", diff --git a/mafic/typings/misc.py b/mafic/typings/misc.py index 7fa6217..724c68f 100644 --- a/mafic/typings/misc.py +++ b/mafic/typings/misc.py @@ -6,8 +6,8 @@ __all__ = ( "Coro", - "LavalinkException", "ExceptionSeverity", + "LavalinkException", "PayloadWithGuild", ) T = TypeVar("T") diff --git a/mafic/typings/outgoing.py b/mafic/typings/outgoing.py index b05319c..902853b 100644 --- a/mafic/typings/outgoing.py +++ b/mafic/typings/outgoing.py @@ -13,8 +13,8 @@ "OutgoingParams", "TrackLoadParams", "UnmarkAddressPayload", - "UpdatePlayerPayload", "UpdatePlayerParams", + "UpdatePlayerPayload", "UpdateSessionPayload", ) 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..23f0f23 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 @@ -27,7 +28,7 @@ def __get__(self, instance: T, owner: type[T] | None = None) -> R: def classproperty( - func: Callable[[T], R] | classmethod[T, ..., R] | staticmethod[..., R] + func: Callable[[T], R] | classmethod[T, ..., R] | staticmethod[..., R], ) -> _ClassPropertyDescriptor[T, R]: """Contains a decorator to mimic the behavior of a property, but for classmethods. diff --git a/mafic/warnings.py b/mafic/warnings.py index a7d574b..cf49b8a 100644 --- a/mafic/warnings.py +++ b/mafic/warnings.py @@ -1,8 +1,9 @@ """Contains the warnings shown from Mafic.""" + # SPDX-License-Identifier: MIT -__all__ = ("UnsupportedVersionWarning", "UnknownVersionWarning") +__all__ = ("UnknownVersionWarning", "UnsupportedVersionWarning") class UnsupportedVersionWarning(UserWarning):