diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f51c8b7d..75f9711ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,10 @@ repos: - id: ruff args: [--fix, --show-fixes] - id: ruff-format + + - repo: https://github.com/ComPWA/taplo-pre-commit + rev: v0.9.3 + hooks: + - id: taplo-format + # See options: https://taplo.tamasfe.dev/configuration/formatter-options.html + args: [--option, "reorder_arrays=true"] diff --git a/pyproject.toml b/pyproject.toml index 79c8ec7e7..afb763721 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,53 +3,34 @@ name = "pyvista-tutorial" requires-python = '>=3.9' [tool.ruff] -exclude = [ - '.git', - 'pycache__', - 'build', - 'dist', - 'doc/tutorial', - 'doc/_build', -] +exclude = ['.git', 'build', 'dist', 'doc/_build', 'doc/tutorial', 'pycache__'] line-length = 100 indent-width = 4 lint.select = ["ALL"] -lint.ignore = [ - "COM812", - "D203", - "D212", - "E501", - "ERA001", - "ISC001" -] +lint.ignore = ["COM812", "D203", "D212", "E501", "ERA001", "ISC001"] [tool.ruff.lint.per-file-ignores] -"doc/**" = [ - "ANN", - "ARG", - "D", - "INP001", -] +"doc/**" = ["ANN", "ARG", "D", "INP001"] "tutorial/**" = [ - "ANN", - "ARG", - # https://github.com/pyvista/pyvista/pull/6014 - "B015", - # https://github.com/pyvista/pyvista/pull/6019 - "B018", - "E402", - "D101", - "D102", - "D103", - "D107", - "D205", - "D400", - "D401", - "D415", - "F704", - "INP001", - "NPY", - "PLE1142", + "ANN", + "ARG", + # https://github.com/pyvista/pyvista/pull/6014 + "B015", + # https://github.com/pyvista/pyvista/pull/6019 + "B018", + "D101", + "D102", + "D103", + "D107", + "D205", + "D400", + "D401", + "D415", + "E402", + "F704", + "INP001", + "NPY", + "PLE1142", ] [tool.ruff.format]