Add pylint to travis-ci (#595)

* Add pylint to travis-ci

* Change travis build order

* Fix missing pylint

* Add pylint to dockerfile

* Test with fixed linter for chrysler changes

* Fix linter issues in OP

* fixed linter on ford

* Fix Riccardo's comments
This commit is contained in:
Nigel Armstrong
2019-04-12 23:12:34 -07:00
committed by GitHub
parent 185375ed64
commit 76dfb135ca
11 changed files with 604 additions and 11 deletions
-1
View File
@@ -1,5 +1,4 @@
from cereal import car
from selfdrive.car.chrysler.values import CAR
VisualAlert = car.CarControl.HUDControl.VisualAlert
@@ -1,6 +1,4 @@
import chryslercan
from values import CAR
from carcontroller import CarController
from selfdrive.can.packer import CANPacker
from cereal import car
+1 -1
View File
@@ -6,7 +6,7 @@ from selfdrive.config import Conversions as CV
from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.car.ford.carstate import CarState, get_can_parser
from selfdrive.car.ford.fordcan import MAX_ANGLE
from selfdrive.car.ford.values import MAX_ANGLE
try:
from selfdrive.car.ford.carcontroller import CarController
+3 -1
View File
@@ -1,12 +1,14 @@
from selfdrive.car import dbc_dict
MAX_ANGLE = 87. # make sure we never command the extremes (0xfff) which cause latching fault
class CAR:
FUSION = "FORD FUSION 2018"
FINGERPRINTS = {
CAR.FUSION: [{
71: 8, 74: 8, 75: 8, 76: 8, 90: 8, 92: 8, 93: 8, 118: 8, 119: 8, 120: 8, 125: 8, 129: 8, 130: 8, 131: 8, 132: 8, 133: 8, 145: 8, 146: 8, 357: 8, 359: 8, 360: 8, 361: 8, 376: 8, 390: 8, 391: 8, 392: 8, 394: 8, 512: 8, 514: 8, 516: 8, 531: 8, 532: 8, 534: 8, 535: 8, 560: 8, 578: 8, 604: 8, 613: 8, 673: 8, 827: 8, 848: 8, 934: 8, 935: 8, 936: 8, 947: 8, 963: 8, 970: 8, 972: 8, 973: 8, 984: 8, 992: 8, 994: 8, 997: 8, 998: 8, 1003: 8, 1034: 8, 1045: 8, 1046: 8, 1053: 8, 1054: 8, 1058: 8, 1059: 8, 1068: 8, 1072: 8, 1073: 8, 1082: 8, 1107: 8, 1108: 8, 1109: 8, 1110: 8, 1200: 8, 1427: 8, 1430: 8, 1438: 8, 1459: 8
}],
}],
}
DBC = {
+2 -2
View File
@@ -66,7 +66,7 @@ SAT_OBS = [ObservationKind.PSEUDORANGE_GPS,
def run_car_ekf_offline(kf, observations_by_kind):
from laika.raw_gnss import GNSSMeasurement
from laika.raw_gnss import GNSSMeasurement # pylint: disable=import-error
observations = []
# create list of observations with element format: [kind, time, data]
for kind in observations_by_kind:
@@ -131,7 +131,7 @@ def run_observations_through_filter(kf, observations, filter_time=None):
def save_residuals_plot(obs, save_path, data_name):
import matplotlib.pyplot as plt
import mpld3
import mpld3 # pylint: disable=import-error
fig = plt.figure(figsize=(10,20))
fig.suptitle('Residuals of ' + data_name, fontsize=24)
n = len(obs.keys())
+1 -1
View File
@@ -462,7 +462,7 @@ def main():
# support additional internal only extensions
try:
import selfdrive.manager_extensions
selfdrive.manager_extensions.register(register_managed_process)
selfdrive.manager_extensions.register(register_managed_process) # pylint: disable=no-member
except ImportError:
pass
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python
import pygame
import pygame # pylint: disable=import-error
from plant import Plant
from selfdrive.car.honda.values import CruiseButtons
import numpy as np