Run mypy commit hook (#1591)

* run mypy commit hook

* fix mypy errors
old-commit-hash: 3d08dcc3b27936cb14c0eae63605be9a6c077380
This commit is contained in:
Willem Melching
2020-05-28 15:05:04 -07:00
committed by GitHub
parent 9aa70600dd
commit 2b60ee9531
39 changed files with 183 additions and 207 deletions
+4 -3
View File
@@ -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 -1
View File
@@ -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)