Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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 .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 docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"]