diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5dc03f8..3c7126e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,10 +58,9 @@ repos: - id: prettier additional_dependencies: - "prettier@^3.2.4" - # docformatter - PEP 257 compliant docstring formatter - - repo: https://github.com/s-weigand/docformatter - rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c + # ruff - An extremely fast Python linter and code formatter, written in Rust. + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.12 hooks: - - id: docformatter - additional_dependencies: [tomli] - args: [--in-place, --config, ./pyproject.toml] + - id: ruff-check + args: [--fix, --config=pyproject.toml] diff --git a/news/ruff.rst b/news/ruff.rst new file mode 100644 index 0000000..f007906 --- /dev/null +++ b/news/ruff.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Changed pre-commit workflow from docformatter to ruff + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index 76a00e8..de259eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,11 @@ exclude-file = ".codespell/ignore_lines.txt" ignore-words = ".codespell/ignore_words.txt" skip = "*.cif,*.dat" -[tool.docformatter] -recursive = true -wrap-summaries = 72 -wrap-descriptions = 72 +[tool.ruff] +line-length = 72 + +[tool.ruff.lint.pydocstyle] +convention = "numpy" [tool.black] line-length = 79