exclude: \.patch$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: check-added-large-files args: - --maxkb=30720 - id: check-merge-conflict - id: check-symlinks - id: detect-private-key files: (?!.*third_party)^.*$ | (?!.*book)^.*$ - id: end-of-file-fixer - id: trailing-whitespace - id: requirements-txt-fixer - id: sort-simple-yaml - repo: https://github.com/Lucas-C/pre-commit-hooks.git rev: v1.5.1 hooks: - id: remove-crlf files: (?!.*third_party)^.*$ | (?!.*book)^.*$ - id: remove-tabs name: Tabs remover (C++) files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps)$ args: [--whitespaces-count, '2'] - id: remove-tabs name: Tabs remover (Python) files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ args: [--whitespaces-count, '4'] - repo: https://github.com/psf/black.git rev: 23.3.0 hooks: - id: black args: [--line-length=127, --skip-string-normalization, --skip-magic-trailing-comma] files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ - repo: https://github.com/pre-commit/mirrors-isort rev: v5.10.1 hooks: - id: isort args: [--profile=black, --line-length=127, --multi-line=3, --force-grid-wrap=0, --src-path=infra, --src-path=pipeline, --src-path=model] files: \.py$ - repo: https://github.com/PyCQA/autoflake rev: v2.3.1 hooks: - id: autoflake args: [--remove-all-unused-imports, --remove-unused-variables, --in-place, --ignore-init-module-imports, --ignore-pass-after-docstring] files: \.py$ - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks.git rev: v2.9.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '4'] additional_dependencies: [setuptools]