diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22d89e2c72406..14528e5fec7c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.1.0 hooks: - id: check-json - id: check-merge-conflict @@ -24,7 +24,7 @@ repos: args: [-c, .markdownlint.yaml, --fix] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.5.0 + rev: v2.5.1 hooks: - id: prettier @@ -40,12 +40,12 @@ repos: - id: sort-package-xml - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.8.0.1 + rev: v0.8.0.3 hooks: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.4.1-1 + rev: v3.4.2-1 hooks: - id: shfmt args: [-w, -s, -i=4] @@ -56,7 +56,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 21.11b1 + rev: 22.1.0 hooks: - id: black args: [--line-length=100] @@ -78,7 +78,7 @@ repos: ] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v12.0.1 + rev: v13.0.0 hooks: - id: clang-format diff --git a/planning/motion_velocity_smoother/scripts/trajectory_visualizer.py b/planning/motion_velocity_smoother/scripts/trajectory_visualizer.py index cdddaf483c196..711c35ae0c2d1 100755 --- a/planning/motion_velocity_smoother/scripts/trajectory_visualizer.py +++ b/planning/motion_velocity_smoother/scripts/trajectory_visualizer.py @@ -390,7 +390,7 @@ def CalcArcLength(self, traj): p1 = traj.points[i] dx = p1.pose.position.x - p0.pose.position.x dy = p1.pose.position.y - p0.pose.position.y - ds = np.sqrt(dx ** 2 + dy ** 2) + ds = np.sqrt(dx**2 + dy**2) s_sum += ds s_arr.append(s_sum) return s_arr @@ -408,7 +408,7 @@ def CalcArcLengthPathWLid(self, traj): p1 = traj.points[i].point dx = p1.pose.position.x - p0.pose.position.x dy = p1.pose.position.y - p0.pose.position.y - ds = np.sqrt(dx ** 2 + dy ** 2) + ds = np.sqrt(dx**2 + dy**2) s_sum += ds s_arr.append(s_sum) return s_arr @@ -426,7 +426,7 @@ def CalcArcLengthPath(self, traj): p1 = traj.points[i] dx = p1.pose.position.x - p0.pose.position.x dy = p1.pose.position.y - p0.pose.position.y - ds = np.sqrt(dx ** 2 + dy ** 2) + ds = np.sqrt(dx**2 + dy**2) s_sum += ds s_arr.append(s_sum) return s_arr @@ -459,7 +459,7 @@ def CalcAcceleration(self, traj): v = 0.5 * (v1 + v0) dx = p1.pose.position.x - p0.pose.position.x dy = p1.pose.position.y - p0.pose.position.y - ds = np.sqrt(dx ** 2 + dy ** 2) + ds = np.sqrt(dx**2 + dy**2) dt = ds / max(abs(v), 0.001) a = (v1 - v0) / dt a_arr.append(a) @@ -480,11 +480,11 @@ def CalcJerk(self, traj): dx0 = p1.pose.position.x - p0.pose.position.x dy0 = p1.pose.position.y - p0.pose.position.y - ds0 = np.sqrt(dx0 ** 2 + dy0 ** 2) + ds0 = np.sqrt(dx0**2 + dy0**2) dx1 = p2.pose.position.x - p1.pose.position.x dy1 = p2.pose.position.y - p1.pose.position.y - ds1 = np.sqrt(dx1 ** 2 + dy1 ** 2) + ds1 = np.sqrt(dx1**2 + dy1**2) dt0 = ds0 / max(abs(0.5 * (v1 + v0)), 0.001) dt1 = ds1 / max(abs(0.5 * (v2 + v1)), 0.001)