From f2edf2c911b4a847af8acac0ed1ed8ae2dfd23bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thi=C3=A9baud=20Fuchs?= Date: Tue, 16 Jul 2024 18:53:27 +0200 Subject: [PATCH] Bump pre-commit config and update --- .pre-commit-config.yaml | 6 +++--- tests/scripts/test_hspi_serdes.py | 4 ++-- tests/scripts/test_loopback.py | 8 ++++---- tests/scripts/test_loopback_randomize_packetsize.py | 8 ++++---- tests/scripts/test_speedtest.py | 8 ++++---- tests/scripts/test_speedtest_one_by_one.py | 8 ++++---- tools/scripts/print_logs.py | 8 ++++---- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4538604..b827e22 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,18 +2,18 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: check-yaml - id: check-added-large-files - id: check-merge-conflict - repo: https://github.com/hhatto/autopep8 - rev: v2.0.4 + rev: v2.3.1 hooks: - id: autopep8 - repo: https://github.com/pylint-dev/pylint - rev: v3.0.2 + rev: v3.2.5 hooks: - id: pylint - repo: https://github.com/pre-commit/mirrors-clang-format diff --git a/tests/scripts/test_hspi_serdes.py b/tests/scripts/test_hspi_serdes.py index eab75d6..d5a88d7 100644 --- a/tests/scripts/test_hspi_serdes.py +++ b/tests/scripts/test_hspi_serdes.py @@ -51,8 +51,8 @@ def check(array_in): intf, find_all=True, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)) assert ep_in is not None diff --git a/tests/scripts/test_loopback.py b/tests/scripts/test_loopback.py index 0c9ba47..9df1a1b 100644 --- a/tests/scripts/test_loopback.py +++ b/tests/scripts/test_loopback.py @@ -92,16 +92,16 @@ def send_next_packet(head, ep_in, ep_out, endp_max_packet_size, buffer_in, buffe intf, find_all=True, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)) ep_out = list(usb.util.find_descriptor( intf, # match the first OUT endpoint find_all=True, - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_OUT)) assert ep_in is not None diff --git a/tests/scripts/test_loopback_randomize_packetsize.py b/tests/scripts/test_loopback_randomize_packetsize.py index 03113db..5fd49f8 100644 --- a/tests/scripts/test_loopback_randomize_packetsize.py +++ b/tests/scripts/test_loopback_randomize_packetsize.py @@ -85,16 +85,16 @@ def send_next_packet(head, ep_in, ep_out, endp_max_packet_size, buffer_in, buffe intf, find_all=True, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)) ep_out = list(usb.util.find_descriptor( intf, # match the first OUT endpoint find_all=True, - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_OUT)) assert ep_in is not None diff --git a/tests/scripts/test_speedtest.py b/tests/scripts/test_speedtest.py index c0c9772..1f32b50 100644 --- a/tests/scripts/test_speedtest.py +++ b/tests/scripts/test_speedtest.py @@ -61,15 +61,15 @@ ep_in = usb.util.find_descriptor( intf, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN) ep_out = usb.util.find_descriptor( intf, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_OUT) assert ep_in is not None diff --git a/tests/scripts/test_speedtest_one_by_one.py b/tests/scripts/test_speedtest_one_by_one.py index 3f54b02..7d8fb92 100644 --- a/tests/scripts/test_speedtest_one_by_one.py +++ b/tests/scripts/test_speedtest_one_by_one.py @@ -64,15 +64,15 @@ ep_in = usb.util.find_descriptor( intf, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN) ep_out = usb.util.find_descriptor( intf, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_OUT) assert ep_in is not None diff --git a/tools/scripts/print_logs.py b/tools/scripts/print_logs.py index 67491fb..7e4671b 100755 --- a/tools/scripts/print_logs.py +++ b/tools/scripts/print_logs.py @@ -39,16 +39,16 @@ intf, find_all=True, # match the first OUT endpoint - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)) ep_out = list(usb.util.find_descriptor( intf, # match the first OUT endpoint find_all=True, - custom_match=lambda e: \ - usb.util.endpoint_direction(e.bEndpointAddress) == \ + custom_match=lambda e: + usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_OUT)) assert ep_in is not None