Skip to content

Commit

Permalink
Add ruff to pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Nov 6, 2023
1 parent 1d66042 commit cd9e305
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
17 changes: 5 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,9 @@ repos:
- --add=Part of HOOMD-blue, released under the BSD 3-Clause License.
- --keep-after=.. include
- --comment-prefix=..
- repo: https://github.com/google/yapf
rev: 'v0.32.0'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
hooks:
- id: yapf
- repo: https://github.com/PyCQA/flake8
rev: '6.0.0'
hooks:
- id: flake8
additional_dependencies:
- pep8-naming==0.13.3
- pydocstyle==6.2.3
- flake8-docstrings==1.6.0
- flake8-rst-docstrings==0.3.0
- id: ruff-format
args: [--check]
- id: ruff
14 changes: 9 additions & 5 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
target-version = "py38"

select = [
extend-select = [
"A",
"B",
"D",
"E",
"F",
"E501",
"I",
"N",
"NPY",
"PL",
"PT",
"RET",
"UP",
"W",
]

ignore = [
"N806", "N803", # allow occasional use of uppercase variable and argument names (e.g. N)
"D107", # do not document __init__ separately from the class
"N806", "N803", # Allow occasional use of uppercase variable and argument names (e.g. N).
"D107", # Do not document __init__ separately from the class.
"PLR09", # Allow "too many" statements/arguments/etc...
]

[pydocstyle]
convention = "google"

[format]
quote-style = "single"

0 comments on commit cd9e305

Please sign in to comment.