From 952ca664fafcae05929a3cd13256232f9e148b03 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 31 Aug 2023 15:00:13 -0700 Subject: [PATCH] Update Python packages and pre-commit hooks (#29739) * Update Python packages and pre-commit hooks * fix linter --------- Co-authored-by: adeebshihadeh old-commit-hash: 9719b227611c880c76a60df223ef6c2f14f1a6ab --- .pre-commit-config.yaml | 2 +- poetry.lock | 4 ++-- selfdrive/car/__init__.py | 2 +- selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4259dec17..2cda93701f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: args: ['--explicit-package-bases'] 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 - rev: v0.0.285 + rev: v0.0.286 hooks: - id: ruff exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)' diff --git a/poetry.lock b/poetry.lock index a81793494c..a075e8d17e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff34673cd3bfa6ccc89968d7e7c30cbe2b03abcfe8abd51721e07d8088a38100 -size 429163 +oid sha256:b698630024156b09836b1acd5ba96b88da5c0225255a06d684c40b3a368cbfb1 +size 437618 diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index 89828a5cf5..c90ae50ab9 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -40,7 +40,7 @@ def create_button_events(cur_btn: int, prev_btn: int, buttons_dict: Dict[int, ca 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 diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index eaa782efee..a23ba1eaf6 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -290,7 +290,7 @@ class LongitudinalMpc: self.x0[1] = v self.x0[2] = a 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) @staticmethod