From 1a165c658035233b4fca774d886c7ecb97a43364 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 19 Dec 2023 23:35:31 -0800 Subject: [PATCH] interfaces: fix get_interface_attr typing (#30813) * fix * Update selfdrive/car/interfaces.py --- selfdrive/car/interfaces.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 0b787897e7..44b198a421 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -3,6 +3,7 @@ import time import numpy as np import tomllib from abc import abstractmethod, ABC +from enum import StrEnum from typing import Any, Dict, Optional, Tuple, List, Callable from cereal import car @@ -440,7 +441,7 @@ INTERFACE_ATTR_FILE = { # interface-specific helpers -def get_interface_attr(attr: str, combine_brands: bool = False, ignore_none: bool = False) -> Dict[str, Any]: +def get_interface_attr(attr: str, combine_brands: bool = False, ignore_none: bool = False) -> Dict[str | StrEnum, Any]: # read all the folders in selfdrive/car and return a dict where: # - keys are all the car models or brand names # - values are attr values from all car folders