The following issues were found

selfdrive/car/chrysler/radar_interface.py
3 issues
Unable to import 'opendbc.can.parser'
Error

Line: 2 Column: 1

              #!/usr/bin/env python3
from opendbc.can.parser import CANParser
from cereal import car
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.chrysler.values import DBC

RADAR_MSGS_C = list(range(0x2c2, 0x2d4+2, 2))  # c_ messages 706,...,724
RADAR_MSGS_D = list(range(0x2a2, 0x2b4+2, 2))  # d_ messages
LAST_MSG = max(RADAR_MSGS_C + RADAR_MSGS_D)

            

Reported by Pylint.

No name 'can' in module 'opendbc'
Error

Line: 2 Column: 1

              #!/usr/bin/env python3
from opendbc.can.parser import CANParser
from cereal import car
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.chrysler.values import DBC

RADAR_MSGS_C = list(range(0x2c2, 0x2d4+2, 2))  # c_ messages 706,...,724
RADAR_MSGS_D = list(range(0x2a2, 0x2b4+2, 2))  # d_ messages
LAST_MSG = max(RADAR_MSGS_C + RADAR_MSGS_D)

            

Reported by Pylint.

No name 'car' in module 'cereal'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from opendbc.can.parser import CANParser
from cereal import car
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.chrysler.values import DBC

RADAR_MSGS_C = list(range(0x2c2, 0x2d4+2, 2))  # c_ messages 706,...,724
RADAR_MSGS_D = list(range(0x2a2, 0x2b4+2, 2))  # d_ messages
LAST_MSG = max(RADAR_MSGS_C + RADAR_MSGS_D)

            

Reported by Pylint.

selfdrive/locationd/paramsd.py
3 issues
No name 'messaging' in module 'cereal'
Error

Line: 8 Column: 1

              import json
import numpy as np

import cereal.messaging as messaging
from cereal import car
from common.params import Params, put_nonblocking
from common.realtime import set_realtime_priority, DT_MDL
from common.numpy_fast import clip
from selfdrive.locationd.models.car_kf import CarKalman, ObservationKind, States

            

Reported by Pylint.

Unable to import 'cereal.messaging'
Error

Line: 8 Column: 1

              import json
import numpy as np

import cereal.messaging as messaging
from cereal import car
from common.params import Params, put_nonblocking
from common.realtime import set_realtime_priority, DT_MDL
from common.numpy_fast import clip
from selfdrive.locationd.models.car_kf import CarKalman, ObservationKind, States

            

Reported by Pylint.

No name 'car' in module 'cereal'
Error

Line: 9 Column: 1

              import numpy as np

import cereal.messaging as messaging
from cereal import car
from common.params import Params, put_nonblocking
from common.realtime import set_realtime_priority, DT_MDL
from common.numpy_fast import clip
from selfdrive.locationd.models.car_kf import CarKalman, ObservationKind, States
from selfdrive.locationd.models.constants import GENERATED_DIR

            

Reported by Pylint.

selfdrive/car/hyundai/radar_interface.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 2 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.hyundai.values import DBC


def get_radar_can_parser(CP):
  signals = [

            

Reported by Pylint.

No name 'can' in module 'opendbc'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.hyundai.values import DBC


def get_radar_can_parser(CP):
  signals = [

            

Reported by Pylint.

Unable to import 'opendbc.can.parser'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.hyundai.values import DBC


def get_radar_can_parser(CP):
  signals = [

            

Reported by Pylint.

selfdrive/locationd/test/print_gps_stats.py
3 issues
No name 'messaging' in module 'cereal'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
import time
import cereal.messaging as messaging

if __name__ == "__main__":
  sm = messaging.SubMaster(['ubloxGnss', 'gpsLocationExternal'])

  while 1:
    ug = sm['ubloxGnss']

            

Reported by Pylint.

Unable to import 'cereal.messaging'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
import time
import cereal.messaging as messaging

if __name__ == "__main__":
  sm = messaging.SubMaster(['ubloxGnss', 'gpsLocationExternal'])

  while 1:
    ug = sm['ubloxGnss']

            

Reported by Pylint.

Try, Except, Pass detected.
Security

Line: 17
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html

                    for m in ug.measurementReport.measurements:
        cnos.append(m.cno)
      print("Sats: %d   Accuracy: %.2f m   cnos" % (ug.measurementReport.numMeas, gle.accuracy), sorted(cnos))
    except Exception:
      pass
    sm.update()
    time.sleep(0.1)

            

Reported by Bandit.

selfdrive/car/hyundai/carcontroller.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 1 Column: 1

              from cereal import car
from common.realtime import DT_CTRL
from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfahda_mfc
from selfdrive.car.hyundai.values import Buttons, CarControllerParams, CAR
from opendbc.can.packer import CANPacker

VisualAlert = car.CarControl.HUDControl.VisualAlert


            

Reported by Pylint.

No name 'can' in module 'opendbc'
Error

Line: 6 Column: 1

              from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfahda_mfc
from selfdrive.car.hyundai.values import Buttons, CarControllerParams, CAR
from opendbc.can.packer import CANPacker

VisualAlert = car.CarControl.HUDControl.VisualAlert


def process_hud_alert(enabled, fingerprint, visual_alert, left_lane,

            

Reported by Pylint.

Unable to import 'opendbc.can.packer'
Error

Line: 6 Column: 1

              from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfahda_mfc
from selfdrive.car.hyundai.values import Buttons, CarControllerParams, CAR
from opendbc.can.packer import CANPacker

VisualAlert = car.CarControl.HUDControl.VisualAlert


def process_hud_alert(enabled, fingerprint, visual_alert, left_lane,

            

Reported by Pylint.

selfdrive/car/honda/values.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 3 Column: 1

              # flake8: noqa

from cereal import car
from selfdrive.car import dbc_dict

Ecu = car.CarParams.Ecu
VisualAlert = car.CarControl.HUDControl.VisualAlert

class CarControllerParams():

            

Reported by Pylint.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Security

Line: 16
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html

                    self.BRAKE_MAX = 1024//4
      self.STEER_MAX = CP.lateralParams.torqueBP[-1]
      # mirror of list (assuming first item is zero) for interp of signed request values
      assert(CP.lateralParams.torqueBP[0] == 0)
      assert(CP.lateralParams.torqueBP[0] == 0)
      self.STEER_LOOKUP_BP = [v * -1 for v in CP.lateralParams.torqueBP][1:][::-1] + list(CP.lateralParams.torqueBP)
      self.STEER_LOOKUP_V = [v * -1 for v in CP.lateralParams.torqueV][1:][::-1] + list(CP.lateralParams.torqueV)

      self.NIDEC_ACCEL_LOOKUP_BP = [-1., 0., .6]

            

Reported by Bandit.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Security

Line: 17
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html

                    self.STEER_MAX = CP.lateralParams.torqueBP[-1]
      # mirror of list (assuming first item is zero) for interp of signed request values
      assert(CP.lateralParams.torqueBP[0] == 0)
      assert(CP.lateralParams.torqueBP[0] == 0)
      self.STEER_LOOKUP_BP = [v * -1 for v in CP.lateralParams.torqueBP][1:][::-1] + list(CP.lateralParams.torqueBP)
      self.STEER_LOOKUP_V = [v * -1 for v in CP.lateralParams.torqueV][1:][::-1] + list(CP.lateralParams.torqueV)

      self.NIDEC_ACCEL_LOOKUP_BP = [-1., 0., .6]
      self.NIDEC_ACCEL_LOOKUP_V = [-4.8, 0., 2.0]

            

Reported by Bandit.

selfdrive/car/mock/interface.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
import math
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.swaglog import cloudlog
import cereal.messaging as messaging
from selfdrive.car import gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase


            

Reported by Pylint.

No name 'messaging' in module 'cereal'
Error

Line: 6 Column: 1

              from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.swaglog import cloudlog
import cereal.messaging as messaging
from selfdrive.car import gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase

# mocked car interface to work with chffrplus
TS = 0.01  # 100Hz

            

Reported by Pylint.

Unable to import 'cereal.messaging'
Error

Line: 6 Column: 1

              from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.swaglog import cloudlog
import cereal.messaging as messaging
from selfdrive.car import gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase

# mocked car interface to work with chffrplus
TS = 0.01  # 100Hz

            

Reported by Pylint.

selfdrive/car/nissan/carcontroller.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 1 Column: 1

              from cereal import car
from common.numpy_fast import clip, interp
from selfdrive.car.nissan import nissancan
from opendbc.can.packer import CANPacker
from selfdrive.car.nissan.values import CAR, CarControllerParams


VisualAlert = car.CarControl.HUDControl.VisualAlert


            

Reported by Pylint.

No name 'can' in module 'opendbc'
Error

Line: 4 Column: 1

              from cereal import car
from common.numpy_fast import clip, interp
from selfdrive.car.nissan import nissancan
from opendbc.can.packer import CANPacker
from selfdrive.car.nissan.values import CAR, CarControllerParams


VisualAlert = car.CarControl.HUDControl.VisualAlert


            

Reported by Pylint.

Unable to import 'opendbc.can.packer'
Error

Line: 4 Column: 1

              from cereal import car
from common.numpy_fast import clip, interp
from selfdrive.car.nissan import nissancan
from opendbc.can.packer import CANPacker
from selfdrive.car.nissan.values import CAR, CarControllerParams


VisualAlert = car.CarControl.HUDControl.VisualAlert


            

Reported by Pylint.

selfdrive/car/honda/radar_interface.py
3 issues
No name 'car' in module 'cereal'
Error

Line: 2 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.honda.values import DBC

def _create_nidec_can_parser(car_fingerprint):
  radar_messages = [0x400] + list(range(0x430, 0x43A)) + list(range(0x440, 0x446))
  signals = list(zip(['RADAR_STATE'] +

            

Reported by Pylint.

No name 'can' in module 'opendbc'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.honda.values import DBC

def _create_nidec_can_parser(car_fingerprint):
  radar_messages = [0x400] + list(range(0x430, 0x43A)) + list(range(0x440, 0x446))
  signals = list(zip(['RADAR_STATE'] +

            

Reported by Pylint.

Unable to import 'opendbc.can.parser'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from cereal import car
from opendbc.can.parser import CANParser
from selfdrive.car.interfaces import RadarInterfaceBase
from selfdrive.car.honda.values import DBC

def _create_nidec_can_parser(car_fingerprint):
  radar_messages = [0x400] + list(range(0x430, 0x43A)) + list(range(0x440, 0x446))
  signals = list(zip(['RADAR_STATE'] +

            

Reported by Pylint.

selfdrive/debug/internal/measure_steering_accuracy.py
2 issues
Unable to import 'cereal.messaging'
Error

Line: 9 Column: 1

              import signal
from collections import defaultdict

import cereal.messaging as messaging

def sigint_handler(signal, frame):
  print("handler!")
  exit(0)
signal.signal(signal.SIGINT, sigint_handler)

            

Reported by Pylint.

No name 'messaging' in module 'cereal'
Error

Line: 9 Column: 1

              import signal
from collections import defaultdict

import cereal.messaging as messaging

def sigint_handler(signal, frame):
  print("handler!")
  exit(0)
signal.signal(signal.SIGINT, sigint_handler)

            

Reported by Pylint.