Applied idiomatic Python improvements and micro-optimizations across registries and API layer.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 20s
CI / Tests (Python 3.13) (push) Successful in 19s
CI / Tests (Python 3.14) (push) Successful in 16s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-26 12:46:50 -04:00
parent 3cf93da28d
commit 0ddffe5e09
18 changed files with 192 additions and 172 deletions
+4 -4
View File
@@ -68,11 +68,11 @@ class CommandInfo:
requires_authenticated: bool = False
requires_moderator: bool = False
cooldown: int | float = 0
all_triggers: frozenset[str] = field(init=False, repr=False)
@property
def all_triggers(self) -> frozenset[str]:
"""All names that trigger this command (name + aliases)."""
return frozenset({self.name}) | self.aliases
def __post_init__(self) -> None:
"""Compute derived fields."""
self.all_triggers = frozenset({self.name}) | self.aliases
def on_command(