From 0f3223809b0855918504fe22e88d0db01353f156 Mon Sep 17 00:00:00 2001 From: texhnolyze Date: Thu, 23 Nov 2023 01:07:25 +0100 Subject: [PATCH] chore(pre-commit): update plugins and actions --- .pre-commit-config.yaml | 4 ++-- config/udp_bridge.yaml | 1 + docs/conf.py | 4 ++-- pyproject.toml | 10 +++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bbe0a1..561c3bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.277 + rev: v0.1.6 hooks: - id: ruff args: - "--fix" - "--exit-non-zero-on-fix" - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.11.0 hooks: - id: black - repo: https://github.com/pocc/pre-commit-hooks diff --git a/config/udp_bridge.yaml b/config/udp_bridge.yaml index 85a9a63..eb7a084 100644 --- a/config/udp_bridge.yaml +++ b/config/udp_bridge.yaml @@ -24,3 +24,4 @@ - /imu/data - /buttons - /system_workload + - /ball_position_relative_filtered diff --git a/docs/conf.py b/docs/conf.py index 8bd6bd3..a9d890d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,11 +27,11 @@ def count_files(): num_py = 0 num_cpp = 0 - for root, dirs, files in os.walk(os.path.join(package_dir, "src")): + for _root, _dirs, files in os.walk(os.path.join(package_dir, "src")): for f in files: if f.endswith(".py"): num_py += 1 - for root, dirs, files in os.walk(os.path.join(package_dir, "include")): + for _root, _dirs, files in os.walk(os.path.join(package_dir, "include")): for f in files: if f.endswith(".h") or f.endswith(".hpp"): num_cpp += 1 diff --git a/pyproject.toml b/pyproject.toml index 437aa88..3ed6ff7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,4 +3,12 @@ line-length = 120 [tool.ruff] line-length = 120 -select = ["F", "E", "W", "I", "N", "UP"] + # Never enforce `E501` (line length violations), as black takes care of this. +ignore = ["E501"] +# Additionally enable the following rules +# - pycodestyle warnings (`W`) +# - flake8-bugbear warnings (`B`) +# - isort import sorting (`I`) +# - pep8-naming convenrtions (`N`) +# - pyupgrade prefer newer language constructs (`UP`) +select = ["F", "E", "B", "W", "I", "N", "UP"]