mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
clean: remove @override
This commit is contained in:
parent
7e6233e72e
commit
2265ab2f62
4 changed files with 0 additions and 18 deletions
|
@ -19,7 +19,6 @@ from discord.ext.commands import (
|
||||||
)
|
)
|
||||||
|
|
||||||
from .minecraft_server import GeyserServer
|
from .minecraft_server import GeyserServer
|
||||||
from .utils import override
|
|
||||||
|
|
||||||
|
|
||||||
class MinearchyBot(CommandsBot):
|
class MinearchyBot(CommandsBot):
|
||||||
|
@ -55,7 +54,6 @@ class MinearchyBot(CommandsBot):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@override
|
|
||||||
async def on_ready(self) -> None:
|
async def on_ready(self) -> None:
|
||||||
print(
|
print(
|
||||||
strip(
|
strip(
|
||||||
|
@ -85,7 +83,6 @@ class MinearchyBot(CommandsBot):
|
||||||
except (ExtensionFailed, NoEntryPointError):
|
except (ExtensionFailed, NoEntryPointError):
|
||||||
print(f"Couldn't load {file_name}:\n{format_exception()}")
|
print(f"Couldn't load {file_name}:\n{format_exception()}")
|
||||||
|
|
||||||
@override
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
async def runner() -> None:
|
async def runner() -> None:
|
||||||
async with self, AIOHTTPSession() as self.session:
|
async with self, AIOHTTPSession() as self.session:
|
||||||
|
|
|
@ -8,7 +8,6 @@ from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from discord.ext.commands import Cog, command
|
from discord.ext.commands import Cog, command
|
||||||
|
|
||||||
from ..utils import override
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from discord import Message
|
from discord import Message
|
||||||
|
@ -26,7 +25,6 @@ class Miscellaneous(
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.bot.help_command.cog = self
|
self.bot.help_command.cog = self
|
||||||
|
|
||||||
@override
|
|
||||||
def cog_unload(self) -> None:
|
def cog_unload(self) -> None:
|
||||||
self.bot.help_command.cog = None
|
self.bot.help_command.cog = None
|
||||||
self.bot.help_command.hidden = True
|
self.bot.help_command.hidden = True
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
from .override import *
|
|
|
@ -1,12 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
__all__ = ("override",)
|
|
||||||
|
|
||||||
from typing import Callable, TypeVar
|
|
||||||
|
|
||||||
T = TypeVar("T", bound = Callable)
|
|
||||||
|
|
||||||
|
|
||||||
def override(function: T) -> T:
|
|
||||||
"""Basically Javas @Override annotation. Makes stuff less ambiguous."""
|
|
||||||
return function
|
|
Loading…
Add table
Add a link
Reference in a new issue