mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
add mypy check for return-any (#24379)
* add mypy check for return-any * remove unused import * typing * remove unnecessary variable typing * cleanup * cleanup * bump submodules * small fixes * only a problem on mac Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: d2eef1955c777ef6110c7a74d2a9ca9e4e1d958c
This commit is contained in:
@@ -4,7 +4,7 @@ import os
|
||||
import usb1
|
||||
import time
|
||||
import subprocess
|
||||
from typing import NoReturn
|
||||
from typing import List, NoReturn
|
||||
from functools import cmp_to_key
|
||||
|
||||
from panda import DEFAULT_FW_FN, DEFAULT_H7_FW_FN, MCU_TYPE_H7, Panda, PandaDFU
|
||||
@@ -102,7 +102,7 @@ def main() -> NoReturn:
|
||||
cloudlog.info(f"{len(panda_serials)} panda(s) found, connecting - {panda_serials}")
|
||||
|
||||
# Flash pandas
|
||||
pandas = []
|
||||
pandas: List[Panda] = []
|
||||
for serial in panda_serials:
|
||||
pandas.append(flash_panda(serial))
|
||||
|
||||
@@ -119,7 +119,7 @@ def main() -> NoReturn:
|
||||
|
||||
# sort pandas to have deterministic order
|
||||
pandas.sort(key=cmp_to_key(panda_sort_cmp))
|
||||
panda_serials = list(map(lambda p: p.get_usb_serial(), pandas))
|
||||
panda_serials = list(map(lambda p: p.get_usb_serial(), pandas)) # type: ignore
|
||||
|
||||
# log panda fw versions
|
||||
params.put("PandaSignatures", b','.join(p.get_signature() for p in pandas))
|
||||
|
||||
Reference in New Issue
Block a user