-
Notifications
You must be signed in to change notification settings - Fork 370
/
ruff.toml
68 lines (61 loc) · 1.54 KB
/
ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
line-length = 120
extend-exclude = [
".ruff_cache",
".env",
".venv",
"**migrations/**",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"Q", # flake8-quotes
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"UP", # pyupgrade
]
ignore = [
"I001", # Import block is un-sorted or un-formatted (would be nice not to do this)
]
[lint.per-file-ignores]
"__init__.py" = [
"F401" # unused-import
]
"explorer/charts.py" = [
"C419", # Unnecessary list comprehension.
"PLR2004", # Magic value used in comparison, consider replacing 2 with a constant variable
]
"explorer/exporters.py" = [
"PLW2901", # `for` loop variable `data` overwritten by assignment target
]
"explorer/models.py" = [
"C417", # Unnecessary `map` usage (rewrite using a generator expression)
]
"explorer/schema.py" = [
"C419", # Unnecessary list comprehension.
]
"explorer/tests/test_utils.py" = [
"C416", # Unnecessary `list` comprehension (rewrite using `list()`)
]
"explorer/views/utils.py" = [
"PLR0913", # Too many arguments in function definition (8 > 5)
]
[lint.isort]
combine-as-imports = true
known-first-party = [
"explorer",
]
extra-standard-library = ["dataclasses"]
[lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 80