Skip to content

Commit 91e0d2b

Browse files
Added ruff (#175)
* Added ruff * Update pyproject.toml Co-authored-by: Mathieu Kniewallner <[email protected]>
1 parent f5d4850 commit 91e0d2b

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ repos:
1515
hooks:
1616
- id: isort
1717

18+
# Temporarily run both ruff and flake8, to see if we are satisfied with ruff so it can replace flake8.
19+
- repo: https://github.com/charliermarsh/ruff-pre-commit
20+
rev: v0.0.106
21+
hooks:
22+
- id: ruff
23+
1824
- repo: https://github.com/PyCQA/flake8
1925
rev: "5.0.4"
2026
hooks:
2127
- id: flake8
2228
additional_dependencies:
2329
- flake8-bugbear==22.9.23
2430
- flake8-comprehensions==3.10.0
25-
- flake8-simplify==0.19.3
31+
- flake8-simplify==0.19.3

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,15 @@ ignore_missing = ["tomllib"]
8989

9090
[tool.poetry.scripts]
9191
deptry = "deptry.cli:deptry"
92+
93+
[tool.ruff]
94+
line-length = 120
95+
96+
select = ["E", "F", "C", "B"]
97+
98+
# PEP-8 The following are ignored:
99+
# E731 do not assign a lambda expression, use a def
100+
# E501 line too long
101+
ignore = ["E731", "E501"]
102+
103+
extend-exclude = ["tests/data/*"]

0 commit comments

Comments
 (0)