Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `bot.start()` can also be used if already in a running event loop. Keep in mind using it will require
handling loop errors, as run() does this automatically.

### Internal

- Code style: two blank lines after imports instead of one. (#70)


## [0.1.0] - 2021-08-13
Expand Down
1 change: 1 addition & 0 deletions modmail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from modmail.log import ModmailLogger


logging.TRACE = 5
logging.NOTICE = 25
logging.addLevelName(logging.TRACE, "TRACE")
Expand Down
1 change: 1 addition & 0 deletions modmail/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from modmail.log import ModmailLogger
from modmail.utils.embeds import patch_embed


try:
# noinspection PyUnresolvedReferences
from colorama import init
Expand Down
1 change: 1 addition & 0 deletions modmail/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from modmail.utils.extensions import EXTENSIONS, NO_UNLOAD, walk_extensions
from modmail.utils.plugins import PLUGINS, walk_plugins


REQUIRED_INTENTS = Intents(
guilds=True,
messages=True,
Expand Down
1 change: 1 addition & 0 deletions modmail/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from pydantic.env_settings import SettingsSourceCallable
from pydantic.types import conint


log = logging.getLogger(__name__)

CONFIG_PATHS: list = [
Expand Down
1 change: 1 addition & 0 deletions modmail/extensions/extension_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from modmail.utils.extensions import EXTENSIONS, NO_UNLOAD, unqualify, walk_extensions
from modmail.utils.pagination import ButtonPaginator


log: ModmailLogger = logging.getLogger(__name__)


Expand Down
1 change: 1 addition & 0 deletions modmail/extensions/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from modmail.log import ModmailLogger
from modmail.utils.cogs import ExtMetadata, ModmailCog


log: ModmailLogger = logging.getLogger(__name__)

EXT_METADATA = ExtMetadata()
Expand Down
1 change: 1 addition & 0 deletions modmail/extensions/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from modmail.utils.cogs import BotModes, ExtMetadata
from modmail.utils.plugins import PLUGINS, walk_plugins


EXT_METADATA = ExtMetadata(load_if_mode=BotModes.PRODUCTION)


Expand Down
1 change: 1 addition & 0 deletions modmail/extensions/utils/paginator_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from modmail.utils.cogs import ModmailCog


if TYPE_CHECKING:
from discord import Interaction

Expand Down
1 change: 1 addition & 0 deletions modmail/plugin_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from modmail.log import ModmailLogger
from modmail.utils.cogs import BotModes, ExtMetadata, ModmailCog


__all__ = ["PluginCog", ModmailBot, ModmailLogger, BotModes, ExtMetadata]


Expand Down
1 change: 1 addition & 0 deletions modmail/utils/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from modmail.config import CONFIG


DEFAULT_COLOR = int(CONFIG.colors.embed_color.as_hex().lstrip("#"), 16)

original_init = discord.Embed.__init__
Expand Down
1 change: 1 addition & 0 deletions modmail/utils/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from modmail.log import ModmailLogger
from modmail.utils.cogs import BOT_MODES, BotModes, ExtMetadata


log: ModmailLogger = logging.getLogger(__name__)

EXT_METADATA = ExtMetadata
Expand Down
1 change: 1 addition & 0 deletions modmail/utils/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from modmail.utils.errors import InvalidArgumentError, MissingAttributeError


if TYPE_CHECKING:
from discord import Interaction
from discord.ui import Button
Expand Down
1 change: 1 addition & 0 deletions modmail/utils/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from modmail.utils.cogs import ExtMetadata
from modmail.utils.extensions import BOT_MODE, unqualify


log: ModmailLogger = logging.getLogger(__name__)


Expand Down
1 change: 1 addition & 0 deletions tests/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from modmail.log import ModmailLogger


"""
Test custom logging levels
"""
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ per-file-ignores=

[isort]
profile=black
multi_line_output=3
include_trailing_comma=true
force_grid_wrap=0
use_parentheses=true
atomic=true
ensure_newline_before_comments=true
force_grid_wrap=0
include_trailing_comma=true
line_length=110
atomic=true
lines_after_imports=2
multi_line_output=3
use_parentheses=true