diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..ed64b98 --- /dev/null +++ b/.codespellignore @@ -0,0 +1,2 @@ +nd +wasn diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c9d08c5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,36 @@ +ci: + autoupdate_schedule: 'monthly' + +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.4.3 + hooks: + # Run the linter. + - id: ruff + types_or: [ python, pyi, jupyter ] + args: [ --fix ] + # Run the formatter. + - id: ruff-format + types_or: [ python, pyi, jupyter ] +- repo: https://github.com/asottile/pyupgrade + rev: v3.15.2 + hooks: + - id: pyupgrade + args: [--py310-plus] +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 # Use the ref you want to point at + hooks: + - id: trailing-whitespace + - id: check-toml + - id: check-yaml +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: [ + "--ignore-words", + ".codespellignore", + "--exclude-file", + "docs/api/search.js", + ]