Skip to content

Commit

Permalink
Platforms: less redundant string repr (commaai#32233)
Browse files Browse the repository at this point in the history
smol
  • Loading branch information
sshane authored Apr 17, 2024
1 parent 6de5e0d commit 3d0f9fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions selfdrive/car/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ def __new__(cls, platform_config: PlatformConfig):
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}
Expand Down

0 comments on commit 3d0f9fb

Please sign in to comment.