diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..30a0b200 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,53 @@ +ci: + autoupdate_branch: "main" + autoupdate_commit_msg: "⬆️ update pre-commit hooks" + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-illegal-windows-names + - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-xml + - id: check-yaml + - id: debug-statements + - id: destroyed-symlinks + - id: detect-aws-credentials + args: [--allow-missing-credentials] + - id: detect-private-key + - id: fix-byte-order-marker + - id: forbid-submodules + - id: no-commit-to-branch + args: [--branch, master] + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + + - repo: https://github.com/crate-ci/typos + rev: v1.29.5 + hooks: + - id: typos + + - repo: https://github.com/astral-sh/uv-pre-commit + rev: 0.5.27 + hooks: + - id: uv-lock + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.4 + hooks: + - id: ruff + args: [--fix, --show-fixes] + types_or: [python, pyi] + + - id: ruff-format + types_or: [python, pyi]