--- repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.1.0 hooks: - id: check-merge-conflict # Check for files that contain merge conflict strings. - id: trailing-whitespace # Trims trailing whitespace. args: [--markdown-linebreak-ext=md] - id: mixed-line-ending # Replaces or checks mixed line ending. args: [--fix=lf] - id: end-of-file-fixer # Makes sure files end in a newline and only a newline. exclude: user_data/.* - id: check-merge-conflict # Check for files that contain merge conflict strings. - id: check-ast # Simply check whether files parse as valid python. # ----- Formatting ------------------------------------------------------------------------------------------------> - repo: https://github.com/asottile/pyupgrade rev: v2.23.0 hooks: - id: pyupgrade name: Rewrite Code to be Py3.7+ args: [--py37-plus] files: tests/.*\.py exclude: user_data/.* - repo: https://github.com/asottile/reorder_python_imports rev: v2.6.0 hooks: - id: reorder-python-imports args: [ --py37-plus, ] files: (tests|.github)/.*\.py - repo: https://github.com/psf/black rev: 22.3.0 hooks: - id: black args: [-l 100] files: (tests|.github)/.*\.py # <---- Formatting -------------------------------------------------------------------------------------------------