Update Python packages and pre-commit hooks (#29739)

* Update Python packages and pre-commit hooks

* fix linter

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
old-commit-hash: 9719b22761
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent fbfc0e460d
commit 952ca664fa
  1. 2
      .pre-commit-config.yaml
  2. 4
      poetry.lock
  3. 2
      selfdrive/car/__init__.py
  4. 2
      selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py

@ -35,7 +35,7 @@ repos:
args: ['--explicit-package-bases'] args: ['--explicit-package-bases']
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)' exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.285 rev: v0.0.286
hooks: hooks:
- id: ruff - id: ruff
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)' exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'

4
poetry.lock generated

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:ff34673cd3bfa6ccc89968d7e7c30cbe2b03abcfe8abd51721e07d8088a38100 oid sha256:b698630024156b09836b1acd5ba96b88da5c0225255a06d684c40b3a368cbfb1
size 429163 size 437618

@ -40,7 +40,7 @@ def create_button_events(cur_btn: int, prev_btn: int, buttons_dict: Dict[int, ca
def gen_empty_fingerprint(): def gen_empty_fingerprint():
return {i: {} for i in range(0, 8)} return {i: {} for i in range(8)}
# these params were derived for the Civic and used to calculate params for other cars # these params were derived for the Civic and used to calculate params for other cars

@ -290,7 +290,7 @@ class LongitudinalMpc:
self.x0[1] = v self.x0[1] = v
self.x0[2] = a self.x0[2] = a
if abs(v_prev - v) > 2.: # probably only helps if v < v_prev if abs(v_prev - v) > 2.: # probably only helps if v < v_prev
for i in range(0, N+1): for i in range(N+1):
self.solver.set(i, 'x', self.x0) self.solver.set(i, 'x', self.x0)
@staticmethod @staticmethod

Loading…
Cancel
Save