diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 120e9fa60..965dc5246 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,45 +1,46 @@ ci: - autofix_commit_msg: | - [pre-commit.ci] auto fixes from pre-commit.com hooks + 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: '' - autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' - autoupdate_schedule: weekly - skip: [] - submodules: false + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. rev: v0.5.6 hooks: - id: ruff exclude: docs/.* args: ["--line-length=88"] + - repo: https://github.com/nbQA-dev/nbQA rev: 1.8.7 hooks: - id: nbqa-ruff args: ["--line-length=120"] + - repo: https://github.com/psf/black rev: 24.8.0 hooks: - id: black - # It is recommended to specify the latest version of Python - # supported by your project here, or alternatively use - # pre-commit's default_language_version, see - # https://pre-commit.com/#top_level-default_language_version language_version: python3 + - repo: https://github.com/psf/black rev: 24.8.0 hooks: - id: black-jupyter language_version: python3 + + # Alternative configuration for docformatter with compatible language - repo: https://github.com/PyCQA/docformatter rev: v1.7.5 hooks: - id: docformatter + language: python # Change to 'python' instead of 'python_venv' additional_dependencies: [tomli] args: [-r, --black, --in-place]