diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 000000000..090aa28e3 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,5 @@ +[settings] +line_length = 120 +multi_line_output=3 +include_trailing_comma = true +ignore_comments = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce9887ccf..dc9087af3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,31 @@ repos: + + - repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + name: sort all imports (python) + - repo: https://github.com/pre-commit/mirrors-yapf rev: v0.32.0 hooks: - id: yapf + name: yapf formatter args: ['--style=.style.yapf', '--parallel', '--in-place'] + - repo: https://github.com/pre-commit/mirrors-clang-format rev: v13.0.1 hooks: - id: clang-format + name: clang formatter + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: check-yaml + - id: check-merge-conflict + - id: check-case-conflict + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + args: ['--fix=lf']