Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

chore(pre-commit): update plugins and actions #139

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install cppcheck
run: sudo apt install cppcheck -y
- uses: pre-commit/action@v3.0.0
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions bitbots_buttons/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,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
Expand Down
4 changes: 2 additions & 2 deletions bitbots_ros_control/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,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
Expand Down
4 changes: 2 additions & 2 deletions bitbots_ros_control/scripts/led_error_blink.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
led_serv = node.create_client(Leds, "/set_leds")
red_request = Leds.Request()
red_leds_array = []
for i in range(3):
for _i in range(3):
red_led = ColorRGBA()
red_led.r = 1.0
red_led.a = 1.0
Expand All @@ -33,7 +33,7 @@
red_request.leds = red_leds_array

orange_leds_array = []
for i in range(3):
for _i in range(3):
orange_led = ColorRGBA()
orange_led.r = 1.0
orange_led.g = 0.5
Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading