Skip to content

Commit

Permalink
Added ruff (#175)
Browse files Browse the repository at this point in the history
* Added ruff
* Update pyproject.toml

Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
  • Loading branch information
fpgmaas and mkniewallner authored Nov 9, 2022
1 parent f5d4850 commit 91e0d2b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ repos:
hooks:
- id: isort

# Temporarily run both ruff and flake8, to see if we are satisfied with ruff so it can replace flake8.
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.106
hooks:
- id: ruff

- repo: https://github.com/PyCQA/flake8
rev: "5.0.4"
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==22.9.23
- flake8-comprehensions==3.10.0
- flake8-simplify==0.19.3
- flake8-simplify==0.19.3
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,15 @@ ignore_missing = ["tomllib"]

[tool.poetry.scripts]
deptry = "deptry.cli:deptry"

[tool.ruff]
line-length = 120

select = ["E", "F", "C", "B"]

# PEP-8 The following are ignored:
# E731 do not assign a lambda expression, use a def
# E501 line too long
ignore = ["E731", "E501"]

extend-exclude = ["tests/data/*"]

0 comments on commit 91e0d2b

Please sign in to comment.