diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e02bd158..0d8cf507 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/.ruff.toml b/.ruff.toml index 67d02735..5ce47c24 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,14 +1,14 @@ target-version = "py38" -select = [ +extend-select = [ "A", "B", "D", - "E", - "F", + "E501", "I", "N", "NPY", + "PL", "PT", "RET", "UP", @@ -16,9 +16,13 @@ select = [ ] 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"