Skip to content

Commit

Permalink
Add taplo pre-commit hook to format and sort toml files (#76)
Browse files Browse the repository at this point in the history
* Add `taplo` pre-commit hook to format and sort `toml` files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tkoyama010 and pre-commit-ci[bot] authored Nov 21, 2024
1 parent 46147e2 commit 8d884b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^(|pyvista/examples/.*\.ply|pyvista/examples/.*\.vtk)

- 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", --option, "reorder_keys=true"]
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
[tool.black]
exclude = '\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist|node_modules'
line-length = 100
skip-string-normalization = false
target-version = ["py38"]
exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist|node_modules'

[tool.isort]
profile = "black"
line_length = 100
profile = "black"
# Sort by name, don't cluster "from" vs "import"
force_sort_within_sections = true
# Combines "as" imports on the same line
combine_as_imports = true


[tool.pytest.ini_options]
filterwarnings = [
"ignore::pvxarray.DataCopyWarning",
]
filterwarnings = ["ignore::pvxarray.DataCopyWarning"]


[tool.codespell]
skip = '*.pyc,*.txt,*.gif,*.png,*.jpg,*.ply,*.vtk,*.vti,*.vtu,*.vts,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,doc/_build/*,./dist/*,*~,.hypothesis*,*.mypy_cache/*,*cover,'
quiet-level = 3
skip = '*.pyc,*.txt,*.gif,*.png,*.jpg,*.ply,*.vtk,*.vti,*.vtu,*.vts,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,doc/_build/*,./dist/*,*~,.hypothesis*,*.mypy_cache/*,*cover,'

0 comments on commit 8d884b9

Please sign in to comment.