mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Run mypy commit hook (#1591)
* run mypy commit hook * fix mypy errors old-commit-hash: 3d08dcc3b27936cb14c0eae63605be9a6c077380
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
from collections import namedtuple
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import pygame
|
||||
|
||||
from tools.lib.lazy_property import lazy_property
|
||||
from selfdrive.config import UIParams as UP
|
||||
from selfdrive.config import RADAR_TO_CAMERA
|
||||
from selfdrive.config import UIParams as UP
|
||||
from selfdrive.controls.lib.lane_planner import (compute_path_pinv,
|
||||
model_polyfit)
|
||||
from tools.lib.lazy_property import lazy_property
|
||||
|
||||
RED = (255, 0, 0)
|
||||
GREEN = (0, 255, 0)
|
||||
@@ -34,7 +35,7 @@ METER_WIDTH = 20
|
||||
|
||||
ModelUIData = namedtuple("ModelUIData", ["cpath", "lpath", "rpath", "lead", "lead_future"])
|
||||
|
||||
_COLOR_CACHE = {}
|
||||
_COLOR_CACHE : Dict[Tuple[int, int, int], Any] = {}
|
||||
def find_color(lidar_surface, color):
|
||||
if color in _COLOR_CACHE:
|
||||
return _COLOR_CACHE[color]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# type: ignore
|
||||
import sys
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
@@ -78,4 +79,3 @@ if __name__ == "__main__":
|
||||
|
||||
# just a bit of wait to avoid 100% CPU usage
|
||||
time.sleep(0.001)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user