Skip to content

Commit c225834

Browse files
authored
Merge pull request #1 from bit-bots/update/pre_commit_config
Update pre-commit config
2 parents c088be6 + efc7907 commit c225834

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v3
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v4
1414
- name: Install cppcheck
1515
run: sudo apt install cppcheck -y
1616
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.0.277
3+
rev: v0.1.6
44
hooks:
55
- id: ruff
66
args:
77
- "--fix"
88
- "--exit-non-zero-on-fix"
99
- repo: https://github.com/psf/black
10-
rev: 23.3.0
10+
rev: 23.11.0
1111
hooks:
1212
- id: black
1313
- repo: https://github.com/pocc/pre-commit-hooks

bitbots_template_cpp/docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def count_files():
2828
num_py = 0
2929
num_cpp = 0
3030

31-
for root, dirs, files in os.walk(os.path.join(package_dir, "src")):
31+
for _root, _dirs, files in os.walk(os.path.join(package_dir, "src")):
3232
for f in files:
3333
if f.endswith(".py"):
3434
num_py += 1
35-
for root, dirs, files in os.walk(os.path.join(package_dir, "include")):
35+
for _root, _dirs, files in os.walk(os.path.join(package_dir, "include")):
3636
for f in files:
3737
if f.endswith(".h") or f.endswith(".hpp"):
3838
num_cpp += 1

bitbots_template_py/docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def count_files():
2828
num_py = 0
2929
num_cpp = 0
3030

31-
for root, dirs, files in os.walk(os.path.join(package_dir, "src")):
31+
for _root, _dirs, files in os.walk(os.path.join(package_dir, "src")):
3232
for f in files:
3333
if f.endswith(".py"):
3434
num_py += 1
35-
for root, dirs, files in os.walk(os.path.join(package_dir, "include")):
35+
for _root, _dirs, files in os.walk(os.path.join(package_dir, "include")):
3636
for f in files:
3737
if f.endswith(".h") or f.endswith(".hpp"):
3838
num_cpp += 1

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,12 @@ line-length = 120
33

44
[tool.ruff]
55
line-length = 120
6-
select = ["F", "E", "W", "I", "N", "UP"]
6+
# Never enforce `E501` (line length violations), as black takes care of this.
7+
ignore = ["E501"]
8+
# Additionally enable the following rules
9+
# - pycodestyle warnings (`W`)
10+
# - flake8-bugbear warnings (`B`)
11+
# - isort import sorting (`I`)
12+
# - pep8-naming convenrtions (`N`)
13+
# - pyupgrade prefer newer language constructs (`UP`)
14+
select = ["F", "E", "B", "W", "I", "N", "UP"]

0 commit comments

Comments
 (0)