From 43c72d410d6934c030dd8c66d18b82cf4c81bcbc Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 16 Apr 2024 23:37:46 -0700 Subject: [PATCH] Platforms: less redundant string repr (#32233) smol old-commit-hash: 3d0f9fb18f52ce092a2eb00cb92f7c285bc56e89 --- selfdrive/car/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index 3898d46534..bbdae4f3d4 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -266,6 +266,9 @@ class Platforms(str, ReprEnum, metaclass=PlatformsType): member._value_ = platform_config.platform_str return member + def __repr__(self): + return f"<{self.__class__.__name__}.{self.name}>" + @classmethod def create_dbc_map(cls) -> dict[str, DbcDict]: return {p: p.config.dbc_dict for p in cls}