-
-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathruff.toml
More file actions
55 lines (46 loc) · 1.63 KB
/
Copy pathruff.toml
File metadata and controls
55 lines (46 loc) · 1.63 KB
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
[lint]
extend-select = [
# upstream
"C901", # complex-structure
"I", # isort
"PERF401", # manual-list-comprehension
"UP", # pyupgrade (Code modernization for strings, annotations, conditions, ...)
# Ensure modern type annotation syntax and best practices
# Not including those covered by type-checkers or exclusive to Python 3.11+
"FA", # flake8-future-annotations
"F404", # late-future-import
"PYI", # flake8-pyi
# local
]
ignore = [
# upstream
"UP015", # redundant-open-modes, explicit is preferred
# Typeshed rejects complex or non-literal defaults for maintenance and testing reasons,
# irrelevant to this project.
"PYI011", # typed-argument-default-in-stub
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"D206",
"D300",
"COM812",
"COM819",
# N999 (invalid-module-name) yields false positives when a project's
# source directory is the distribution name and is redirected to a
# different import package (e.g. namespace layouts); the dotted directory
# name is itself a valid module. See
# https://github.com/astral-sh/ruff/issues/27801.
"N999",
# B008 is over-reaching; see jaraco/skeleton#214
"B008", # function-call-in-default-argument
# local
]
[lint.flake8-comprehensions]
# Retain the elegant dict(a=1) keyword-call style; C408 still flags dict()
# and dict([...]). See jaraco/skeleton#210.
allow-dict-calls-with-keyword-arguments = true
[format]
# Enable preview to get hugged parenthesis unwrapping and other nice surprises
# See https://github.com/jaraco/skeleton/pull/133#issuecomment-2239538373
preview = true
# https://docs.astral.sh/ruff/settings/#format_quote-style
quote-style = "preserve"