Skip to content

Commit

Permalink
chore: Add ruff configuration and update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-treebeard committed Dec 23, 2024
1 parent 4f4452e commit 1b9f787
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ repos:
rev: v0.1.9
hooks:
- id: ruff
args: [--fix]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
args: [--line-length=88]
- repo: local
hooks:
- id: pyright
Expand Down
19 changes: 19 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F", "I"]
ignore = []

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "I"]
unfixable = []

# Same as Black.
line-length = 88

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.8
target-version = "py38"

[isort]
known-first-party = ["nbmake"]

0 comments on commit 1b9f787

Please sign in to comment.