mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-02 16:43:12 +00:00
[Fix] pyproject.toml refractoring
This commit is contained in:
parent
051f461aec
commit
e5c905a024
18 changed files with 72 additions and 56 deletions
103
pyproject.toml
103
pyproject.toml
|
@ -44,32 +44,32 @@ include = '\.pyi?$'
|
|||
[tool.ruff]
|
||||
# Exclude a variety of commonly ignored directories.
|
||||
exclude = [
|
||||
".bzr",
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".git-rewrite",
|
||||
".hg",
|
||||
".ipynb_checkpoints",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pyenv",
|
||||
".pytest_cache",
|
||||
".pytype",
|
||||
".ruff_cache",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
".vscode",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"site-packages",
|
||||
"venv",
|
||||
".bzr",
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".git-rewrite",
|
||||
".hg",
|
||||
".ipynb_checkpoints",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pyenv",
|
||||
".pytest_cache",
|
||||
".pytype",
|
||||
".ruff_cache",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
".vscode",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"site-packages",
|
||||
"venv",
|
||||
]
|
||||
|
||||
# Same as Black.
|
||||
|
@ -87,7 +87,6 @@ target-version = "py311"
|
|||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||
# McCabe complexity (`C901`) by default.
|
||||
ignore = []
|
||||
select = [
|
||||
# pycodestyle
|
||||
"E",
|
||||
|
@ -102,6 +101,8 @@ select = [
|
|||
# isort
|
||||
"I",
|
||||
]
|
||||
ignore = ["E501"]
|
||||
|
||||
|
||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||
fixable = ["ALL"]
|
||||
|
@ -147,32 +148,32 @@ docstring-code-line-length = "dynamic"
|
|||
################################################################
|
||||
|
||||
[tool.pyright]
|
||||
defineConstant = {DEBUG = true}
|
||||
defineConstant = { DEBUG = true }
|
||||
|
||||
exclude = [
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".hg",
|
||||
".ipynb_checkpoints",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pyenv",
|
||||
".pytest_cache",
|
||||
".pytype",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
".vscode",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"site-packages",
|
||||
"venv",
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".hg",
|
||||
".ipynb_checkpoints",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pyenv",
|
||||
".pytest_cache",
|
||||
".pytype",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
".vscode",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"site-packages",
|
||||
"venv",
|
||||
]
|
||||
|
||||
include = ["."]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_bulk_message_delete.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_channel_create.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_channel_delete.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -3,6 +3,7 @@ from datetime import datetime
|
|||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_channel_update.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_role_create.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_role_delete.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_guild_role_update.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_member_ban.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_member_join.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_member_remove.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_member_unban.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Import the necessary modules
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
# Initialize the logger
|
||||
|
@ -72,7 +73,7 @@ class OnMemberUpdate(commands.Cog):
|
|||
The channel ID needs to be replaced with the actual ID of the channel you want to send the embed to.
|
||||
"""
|
||||
some_channel = self.bot.get_channel(
|
||||
channel_id
|
||||
"1191472088695980083"
|
||||
) # Replace 'channel_id' with the actual ID
|
||||
await some_channel.send(embed=embed)
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_message.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_message_delete.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# on_message_edit.py
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from tux.utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
|
|
|
@ -3,15 +3,14 @@ import os
|
|||
|
||||
import discord
|
||||
from cog_loader import CogLoader
|
||||
from discord.ext import commands
|
||||
from dotenv import load_dotenv
|
||||
from utils.error_handler import ErrorHandler
|
||||
from utils.tux_logger import TuxLogger
|
||||
|
||||
logger = TuxLogger(__name__)
|
||||
load_dotenv()
|
||||
|
||||
from discord.ext import commands
|
||||
from utils.error_handler import ErrorHandler
|
||||
|
||||
|
||||
async def setup(bot: commands.Bot, debug: bool = False):
|
||||
"""
|
||||
|
@ -99,7 +98,7 @@ async def main():
|
|||
logger.info(f"{bot.user} has connected to Discord!", __name__)
|
||||
|
||||
await bot.start(os.getenv("TOKEN") or "", reconnect=True)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.error("An error occurred:", exc_info=True)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue