|
6 | 6 | rev: 0.7.1
|
7 | 7 | hooks:
|
8 | 8 | - id: nbstripout
|
| 9 | + |
| 10 | + - repo: https://github.com/codespell-project/codespell |
| 11 | + rev: v2.3.0 |
| 12 | + hooks: |
| 13 | + - id: codespell |
| 14 | + name: codespell |
| 15 | + description: Checks for common misspellings in text files. |
| 16 | + entry: codespell --skip="*.js,*.html,*.css, *.svg" --ignore-words=.codespell-ignores.txt |
| 17 | + language: python |
| 18 | + types: [text] |
| 19 | + |
| 20 | + |
| 21 | + - repo: https://github.com/PyCQA/flake8 |
| 22 | + rev: 7.1.0 |
| 23 | + hooks: |
| 24 | + - id: flake8 |
| 25 | + args: |
| 26 | + - --max-line-length=100 |
| 27 | + - --max-cognitive-complexity=15 |
| 28 | + - --ignore=E203,E266,E501,W503,F722 |
| 29 | + additional_dependencies: |
| 30 | + - pep8-naming==0.13.3 |
| 31 | + - flake8-absolute-import==1.0.0.1 |
| 32 | + - flake8-bugbear==22.12.6 |
| 33 | + - flake8-builtins==2.0.1 |
| 34 | + - flake8-class-attributes-order==0.1.3 |
| 35 | + - flake8-cognitive-complexity==0.1.0 |
| 36 | + - flake8-comprehensions==3.10.1 |
| 37 | + - flake8-pytest-style==1.6.0 |
| 38 | + |
| 39 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 40 | + rev: v4.6.0 |
| 41 | + hooks: |
| 42 | + - id: debug-statements # Check for debugger imports |
| 43 | + - id: requirements-txt-fixer # Order requirements alphabetically |
| 44 | + - id: check-ast # Simply check whether the files parse as valid python |
| 45 | + - id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems |
| 46 | + - id: check-builtin-literals # Require literal syntax when initializing empty or zero Python builtin types |
| 47 | + - id: check-docstring-first # Check a common error of defining a docstring after code |
| 48 | + - id: check-merge-conflict # Check for files that contain merge conflict strings |
| 49 | + - id: check-yaml # Check yaml files |
| 50 | + args: ["--unsafe"] |
| 51 | + - id: end-of-file-fixer # Ensure that a file is either empty, or ends with one newline |
| 52 | + - id: mixed-line-ending # Replace or checks mixed line ending |
| 53 | + - id: trailing-whitespace # This hook trims trailing whitespace |
| 54 | + |
| 55 | + - repo: https://github.com/kynan/nbstripout |
| 56 | + rev: 0.7.1 |
| 57 | + hooks: |
| 58 | + - id: nbstripout |
| 59 | + |
| 60 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 61 | + rev: v0.5.1 |
| 62 | + hooks: |
| 63 | + # Run the linter. |
| 64 | + - id: ruff |
| 65 | + args: [--fix, --ignore, F722] |
| 66 | + # Run the formatter. |
| 67 | + - id: ruff-format |
0 commit comments