Start refactoring bot, add /remind add command

This commit is contained in:
2025-01-03 15:03:47 +01:00
parent 2e30cafbac
commit c8b6dbfe41
19 changed files with 279 additions and 2774 deletions

View File

@ -11,6 +11,7 @@ dependencies = [
"apscheduler<4.0.0",
"discord-py",
"audioop-lts",
"discord-webhook",
]
[dependency-groups]
@ -45,13 +46,13 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# https://docs.astral.sh/ruff/linter/
preview = true
# Enable all rules
line-length = 120
lint.select = ["ALL"]
lint.pydocstyle.convention = "google"
lint.isort.required-imports = ["from __future__ import annotations"]
lint.pycodestyle.ignore-overlong-task-comments = true
# Ignore some rules
lint.ignore = [
"CPY001", # Checks for the absence of copyright notices within Python files.
"D100", # Checks for undocumented public module definitions.
@ -78,24 +79,13 @@ lint.ignore = [
"W191", # Checks for indentation that uses tabs.
]
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
lint.pydocstyle.convention = "google"
# Add "from __future__ import annotations" to all files
lint.isort.required-imports = ["from __future__ import annotations"]
lint.pycodestyle.ignore-overlong-task-comments = true
# Default is 88 characters
line-length = 120
[tool.ruff.format]
# https://docs.astral.sh/ruff/formatter/
docstring-code-format = true
docstring-code-line-length = 20
[tool.ruff.lint.per-file-ignores]
"**/*_test.py" = [
"**/test_*.py" = [
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"PLR2004", # Magic value used in comparison, ...
@ -103,13 +93,10 @@ docstring-code-line-length = 20
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
# https://pytest-django.readthedocs.io/en/latest/
[tool.pytest.ini_options]
# Enable logging in the console.
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
# Only test files with the following suffixes.
python_files = "test_*.py *_test.py *_tests.py"