diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ff6f8156abbba5f22cca30a699ff7ba40e3dd4bf --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,44 @@ +repos: + - repo: meta + hooks: + - id: identity + - repo: https://github.com/nbQA-dev/nbQA + rev: 0.3.6 + hooks: + - id: nbqa-isort + additional_dependencies: [isort==5.6.4] + args: [--nbqa-mutate] + - id: nbqa-flake8 + additional_dependencies: [flake8==3.8.4] + args: [--nbqa-mutate] + - repo: https://github.com/kynan/nbstripout + rev: 0.3.9 + hooks: + - id: nbstripout + - repo: https://github.com/pycqa/isort + rev: 5.3.0 + hooks: + - id: isort + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 + entry: bash -c 'git diff $CI_MERGE_REQUEST_TARGET_BRANCH_SHA | flake8 --diff' -- + - repo: https://github.com/myint/rstcheck + rev: 3f92957478422df87bd730abde66f089cc1ee19b # commit where pre-commit support was added + hooks: + - id: rstcheck + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-json + - id: check-yaml + - id: check-toml + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-docstring-first + - id: check-merge-conflict + - id: mixed-line-ending + args: [--fix=lf]