def class_by_prefix(
prefix: str,
-) -> Union[Type[GPS303Pkt], List[Tuple[str, int]]]:
+) -> Union[Type[GPS303Pkt], List[str]]:
if prefix.startswith(PROTO_PREFIX):
pname = prefix[len(PROTO_PREFIX) :]
else:
if name.upper().startswith(prefix.upper())
]
if len(lst) != 1:
- return lst
+ return [name for name, _ in lst]
_, proto = lst[0]
return CLASSES[proto]