Skip to content

Commit

Permalink
interfaces: fix get_interface_attr typing (commaai#30813)
Browse files Browse the repository at this point in the history
* fix

* Update selfdrive/car/interfaces.py
  • Loading branch information
sshane authored Dec 20, 2023
1 parent 426072b commit 1a165c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion selfdrive/car/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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
Expand Down Expand Up @@ -440,7 +441,7 @@ def get_loopback_can_parser(CP):

# 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
Expand Down

0 comments on commit 1a165c6

Please sign in to comment.