chore: resolve all ruff linting and static analysis errors in EvoScientist/

- Fix RUF006: Implement background task tracking in Discord, iMessage, WeChat, and TUI to prevent premature GC of fire-and-forget tasks.
- Fix B904: Add explicit exception chaining (raise ... from) across all exception handlers.
- Fix RUF012: Annotate mutable class attributes with ClassVar for command arguments and media maps.
- Fix B008: Refactor Typer commands in cli/commands.py to use Annotated for argument and option defaults.
- Fix B023/B018: Resolve late-binding issues in lambdas and remove useless expressions.
- Fix syntax errors in retry.py docstrings and models.py lambda parameter ordering.
This commit is contained in:
Jan Piotrowski
2026-03-19 15:38:10 +01:00
parent 4a3d6c0318
commit 81316ffb2d
42 changed files with 331 additions and 264 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class EmailChannel(Channel, PollingMixin):
self._imap.login(cfg.imap_username, cfg.imap_password)
self._imap.select(cfg.imap_mailbox)
except Exception as e:
raise ChannelError(f"IMAP failed: {e}")
raise ChannelError(f"IMAP failed: {e}") from e
def _reconnect_imap(self) -> None:
try: