|
| 1 | +repos: |
| 2 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 3 | + rev: v4.3.0 |
| 4 | + hooks: |
| 5 | + - id: check-added-large-files # prevents giant files from being committed. |
| 6 | + - id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems. |
| 7 | + - id: check-merge-conflict # checks for files that contain merge conflict strings. |
| 8 | + - id: check-yaml # checks yaml files for parseable syntax. |
| 9 | + - id: detect-private-key # detects the presence of private keys. |
| 10 | + - id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline. |
| 11 | + - id: fix-byte-order-marker # removes utf-8 byte order marker. |
| 12 | + - id: mixed-line-ending # replaces or checks mixed line ending. |
| 13 | + - id: trailing-whitespace # trims trailing whitespace. |
| 14 | + - id: check-json |
| 15 | + - id: pretty-format-json |
| 16 | + # exclude autogenerated files |
| 17 | + exclude: /README\.rst$|\.pot?$ |
| 18 | + args: ['--no-sort-keys', "--autofix"] |
| 19 | +- repo: https://github.com/pre-commit/mirrors-isort |
| 20 | + rev: v5.10.1 |
| 21 | + hooks: |
| 22 | + - id: isort |
| 23 | + language_version: python3.10 |
| 24 | + args: ['--line-length=120', '--profile=black'] |
| 25 | + files: "\\.py$" |
| 26 | +- repo: https://github.com/ambv/black |
| 27 | + rev: 22.3.0 |
| 28 | + hooks: |
| 29 | + - id: black |
| 30 | + language_version: python3.10 |
| 31 | + args: ['--line-length=120'] |
| 32 | + files: "\\.py$" |
| 33 | + |
| 34 | + |
| 35 | +- repo: https://github.com/myint/autoflake |
| 36 | + rev: v1.4 |
| 37 | + hooks: |
| 38 | + - id: autoflake |
| 39 | + args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] |
| 40 | + language_version: python3.10 |
| 41 | + |
| 42 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 43 | + rev: v1.3.0 |
| 44 | + hooks: |
| 45 | + - id: flake8 |
| 46 | + language_version: python3.10 |
| 47 | + |
| 48 | +- repo: https://github.com/kynan/nbstripout |
| 49 | + rev: 0.6.1 |
| 50 | + hooks: |
| 51 | + - id: nbstripout |
0 commit comments