--- exclude: '.*[\\/]pretty_.*\.html$' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: check-yaml # Check YAML files for syntax errors - id: debug-statements # Check for debugger imports and py37+ breakpoint() - id: end-of-file-fixer # Ensure files end in a newline exclude: '^pretty_.*\.html$' - id: trailing-whitespace # Trailing whitespace checker exclude: '^pretty_.*\.html$' - id: check-added-large-files # Check for large files added to git - id: check-merge-conflict # Check for files that contain merge conflict strings - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 # Use the ref you want to point at hooks: - id: python-use-type-annotations # Check for missing type annotations - id: python-check-blanket-noqa # Check for # noqa: all - id: python-no-log-warn # Check for log.warn - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: - id: isort args: - -l 120 - --force-single-line-imports - --profile black - repo: https://github.com/asottile/pyupgrade # Upgrade Python syntax rev: v3.21.2 hooks: - id: pyupgrade args: - --py310-plus - repo: https://github.com/psf/black # Format Python code rev: 24.4.2 hooks: - id: black args: - --line-length=120 - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.4 hooks: - id: ruff args: - --line-length=120 - --fix - --exit-non-zero-on-fix - --preview - repo: https://github.com/jshwi/docsig # Check docstrings against function sig rev: v0.53.2 hooks: - id: docsig args: - --ignore-no-params # Allow docstrings without parameters - --check-dunders # Check dunder methods - --check-overridden # Check overridden methods - --check-protected # Check protected methods - --check-class # Check class docstrings - --disable=E113 # Disable empty docstrings - --summary # Print a summary ci: autofix_commit_msg: | [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci autofix_prs: true autoupdate_branch: 'automated/pre-commit-autoupdate' autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' autoupdate_schedule: monthly submodules: false