Conversation
Code ReviewSummaryClean refactoring that defers heavy imports ( 🔴 Blocking Issue
The def __str__(self) -> str:
return (
colors.green(f"{self.__class__.__name__}(") # ❌ NameError
+ colors.blue(self.topic)
+ colors.green(")")
)Any call to Fix: Either restore the import, or defer it into def __str__(self) -> str:
from dimos.utils import colors
return (
colors.green(f"{self.__class__.__name__}(")
+ colors.blue(self.topic)
+ colors.green(")")
)Non-blocking Suggestions
Questions / ClarificationsNone — the intent is clear from the PR description and code. |
Co-authored-by: Sam Bull <Sam.B@snowfalltravel.com>
Problem
This improves import time for some dimos.core modules, which are needed for #1543. Separating the import improvements for easier review.
Solution
To avoid having too many repetitive inline imports harming readability, JpegEncoderMixin is moved to a separate module to avoid the heavy import of Image when importing the other classes in that module,