diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a38e76..b768689 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,22 +25,21 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. repos: -- repo: https://github.com/timothycrosley/isort - rev: 5.12.0 - hooks: - - id: isort - additional_dependencies: [toml] -- repo: https://github.com/psf/black - rev: 23.1.0 + +# Python formatting/linting +## Run the Ruff formatter. +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 hooks: - - id: black - types_or: [python, cython] -- repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + - id: ruff-format + +## Run the Ruff linter. +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 hooks: - - id: flake8 - args: [--max-line-length=88, --select=C,E,F,W,B,B950, --extend-ignore = E203,E501] - types_or: [python, cython] + - id: ruff + +# Spellchecking - repo: https://github.com/codespell-project/codespell rev: v2.2.4 hooks: @@ -48,6 +47,7 @@ repos: additional_dependencies: [tomli] args: ["--toml", "pyproject.toml"] exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) + # More details about these pre-commit hooks here: # https://pre-commit.com/hooks.html - repo: https://github.com/pre-commit/pre-commit-hooks