Skip to content

Commit

Permalink
Ruff (#12)
Browse files Browse the repository at this point in the history
- Ruff is modern and fast; it replaces flake8, isort and black.
- It is configurable via the pyproject.toml file.
  • Loading branch information
danielfleischer authored Sep 4, 2024
1 parent b375048 commit 925be97
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
20 changes: 7 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
args: ["-l", "90"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args: ["--unsafe", "mkdocs.yml"]
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ haystack = [
"haystack-ai==2.3.1",
"qdrant-haystack>=5.0.0",
]

[tool.ruff]
line-length = 90

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "Q"]
ignore = ["E203", "F841", "E501"]
6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

0 comments on commit 925be97

Please sign in to comment.