|
1 | 1 | # See https://pre-commit.com for more information |
2 | 2 | # See https://pre-commit.com/hooks.html for more hooks |
| 3 | +files: ".py$" |
| 4 | +exclude: "sphinx-docs/" |
3 | 5 | repos: |
4 | | - - repo: local |
5 | | - hooks: |
6 | | - - id: black |
7 | | - name: black |
8 | | - description: "Black: The uncompromising Python code formatter" |
9 | | - entry: black |
10 | | - language: python |
11 | | - require_serial: true |
12 | | - types_or: [python, pyi] |
13 | | - - id: flake8 |
14 | | - name: flake8 |
15 | | - description: '`flake8` is a command-line utility for enforcing style consistency across Python projects.' |
16 | | - entry: flake8 |
17 | | - language: python |
18 | | - types: [python] |
19 | | - require_serial: true |
20 | | - - id: mypy |
21 | | - name: mypy |
22 | | - description: 'Mypy is a static type checker for Python 3' |
23 | | - entry: mypy |
24 | | - language: python |
25 | | - types: [python] |
26 | | - require_serial: true |
| 6 | + - repo: https://github.com/psf/black |
| 7 | + rev: 22.10.0 |
| 8 | + hooks: |
| 9 | + - id: black |
| 10 | + name: black |
| 11 | + description: "Black: The uncompromising Python code formatter" |
| 12 | + entry: black |
| 13 | + language: python |
| 14 | + require_serial: true |
| 15 | + types_or: [python, pyi] |
| 16 | + args: [--config=code-checks/.black.cfg] |
| 17 | + - repo: https://github.com/PyCQA/isort |
| 18 | + rev: 5.10.1 |
| 19 | + hooks: |
| 20 | + - id: isort |
| 21 | + name: Run isort to sort imports in Python files |
| 22 | + files: \.py$|\.pyi$ |
| 23 | + args: [--settings-path=code-checks/.isort.cfg] |
| 24 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 25 | + rev: v4.3.0 |
| 26 | + hooks: |
| 27 | + - id: check-merge-conflict |
| 28 | + name: Check that merge conflicts are not being committed |
| 29 | + - id: trailing-whitespace |
| 30 | + name: Remove trailing whitespace at end of line |
| 31 | + - id: mixed-line-ending |
| 32 | + name: Detect if mixed line ending is used (\r vs. \r\n) |
| 33 | + - id: end-of-file-fixer |
| 34 | + name: Make sure that there is an empty line at the end |
| 35 | + - repo: https://github.com/PyCQA/flake8 |
| 36 | + rev: 5.0.4 |
| 37 | + hooks: |
| 38 | + - id: flake8 |
| 39 | + name: flake8 |
| 40 | + description: '`flake8` is a command-line utility for enforcing style consistency across Python projects.' |
| 41 | + entry: flake8 |
| 42 | + language: python |
| 43 | + types: [python] |
| 44 | + require_serial: true |
| 45 | + args: [--config=code-checks/.flake8] |
| 46 | + - repo: local |
| 47 | + hooks: |
| 48 | + - id: mypy |
| 49 | + name: mypy |
| 50 | + description: 'Optional static typing for Python (installed by Poetry)' |
| 51 | + entry: mypy |
| 52 | + language: python |
| 53 | + require_serial: true |
| 54 | + types_or: [python, pyi] |
| 55 | + args: [--config-file=code-checks/.mypy.ini] |
0 commit comments