-
Notifications
You must be signed in to change notification settings - Fork 285
/
Copy pathpyproject.toml
95 lines (90 loc) · 2.46 KB
/
pyproject.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
line-length = 120
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"C", # flake8-comprehensions
"DJ", # flake8-django
"INT", # flake8-gettext
"PIE", # flake8-pie
"Q", # flake8-quotes
"SIM", # flake8-simplify
"PGH", # pygrep-hooks
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"UP", # pyupgrade
"C901", # mccabe
"N", # pep8-naming
"YTT", # flake8-2020,
"RUF"
]
extend-exclude = [
".eggs",
".git",
".mypy_cache",
".ruff_cache",
".env",
".venv",
"**locale/**",
"**migrations/**",
"node_modules",
"venv",
]
lint.extend-ignore = [
"B006", # Do not use mutable data structures for argument defaults
"B011", # tests use assert False
"B019", # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
"B905", # `zip()` without an explicit `strict=` parameter
"C901", # too complex functions
"DJ001", # Avoid using `null=True` on string-based fields such as CharField
"E402", # module level import not at top of file
"E731", # do not assign a lambda expression, use a def
"FBT002", # Boolean default value in function definition
"FBT003", # Boolean positional value in function call
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # Use a single `if` statement instead of nested `if` statements
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401" # unused-import
]
"djangogirls/urls.py" = [
"RUF005" # Consider iterable unpacking instead of concatenation
]
"tests/core/test_admin.py" = [
"RUF017" # Avoid quadratic list summation
]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = [
"applications",
"coach",
"contact",
"core",
"djangogirls",
"donations",
"globalpartners",
"jobboard",
"organize",
"patreonmanager",
"pictures",
"sponsor",
"story",
]
extra-standard-library = ["dataclasses"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 80