haystack/.pre-commit-config.yaml
Christian Clauss 91ab90a256
perf: Python performance improvements with ruff C4 and PERF fixes (#5803)
* Python performance improvements with ruff C4 and PERF

* pre-commit fixes

* Revert changes to examples/basic_qa_pipeline.py

* Revert changes to haystack/preview/testing/document_store.py

* revert releasenotes

* Upgrade to ruff v0.0.290
2023-09-16 16:26:07 +02:00

43 lines
1.3 KiB
YAML

fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast # checks Python syntax
- id: check-json # checks JSON syntax
- id: check-merge-conflict # checks for no merge conflict strings
- id: check-shebang-scripts-are-executable # checks all shell scripts have executable permissions
- id: check-toml # checks TOML syntax
- id: check-yaml # checks YAML syntax
- id: end-of-file-fixer # checks there is a newline at the end of the file # FIXME: pydoc-markdown conflicts with this
- id: mixed-line-ending # normalizes line endings
- id: no-commit-to-branch # prevents committing to main
- id: trailing-whitespace # trims trailing whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
hooks:
- id: ruff
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/rhysd/actionlint
rev: v1.6.25
hooks:
- id: actionlint-docker
args: ["-ignore", "SC2102"]
# TODO we can make pylint run at this stage too, once their execution gets normalized