From 104d70854717fa7ea7db16ee4db66445d925bd65 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Tue, 5 Sep 2023 15:32:44 -0700 Subject: [PATCH] Precommit: ensure executable bit is set (#1650) * precommit ensure executable * fix the violations * the correct shebang --- .pre-commit-config.yaml | 2 ++ examples/tesla_tester.py | 0 python/ccp.py | 1 - python/uds.py | 1 - tests/read_winusb_descriptors.py | 0 tests/safety_replay/helpers.py | 1 - tests/usbprotocol/test_comms.py | 1 + 7 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 examples/tesla_tester.py mode change 100644 => 100755 tests/read_winusb_descriptors.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d37c5d15..a44c089c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,8 @@ repos: - id: check-yaml - id: check-merge-conflict - id: check-symlinks + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.5.1 hooks: diff --git a/examples/tesla_tester.py b/examples/tesla_tester.py old mode 100644 new mode 100755 diff --git a/python/ccp.py b/python/ccp.py index 91831200..50a5f87a 100644 --- a/python/ccp.py +++ b/python/ccp.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 import sys import time import struct diff --git a/python/uds.py b/python/uds.py index 9b25dffe..aaa0697f 100644 --- a/python/uds.py +++ b/python/uds.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 import time import struct from collections import deque diff --git a/tests/read_winusb_descriptors.py b/tests/read_winusb_descriptors.py old mode 100644 new mode 100755 diff --git a/tests/safety_replay/helpers.py b/tests/safety_replay/helpers.py index 4877b2e5..4c84e532 100644 --- a/tests/safety_replay/helpers.py +++ b/tests/safety_replay/helpers.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 import panda.tests.libpanda.libpanda_py as libpanda_py from panda import Panda diff --git a/tests/usbprotocol/test_comms.py b/tests/usbprotocol/test_comms.py index 9b020f23..c08551b7 100755 --- a/tests/usbprotocol/test_comms.py +++ b/tests/usbprotocol/test_comms.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import random import unittest