-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
76 lines (69 loc) · 2.12 KB
/
ruff.toml
File metadata and controls
76 lines (69 loc) · 2.12 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
line-length = 120
preview = true
[format]
quote-style = "single"
[lint.isort]
lines-after-imports = 2
known-first-party = ['notebook']
[lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "single"
[lint.pep8-naming]
ignore-names = ["*Exception"]
[lint.per-file-ignores]
"__init__.py" = ["F401"]
"test_*.py" = ["S101"]
[lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comrehensions
"C90", # mccabe
"COM", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle error
"F", # pyflakes
"FIX", # flake8-fixme
"FURB", # refurb
"I", # isort
"INP", # flake8-no-pep420
"N", # pep8-naming
"PERF", # perflint
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RUF", # ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warning
]
ignore = [
"D1", # undocumented-*
"D203", # choice between D203 (incorrect-blank-line-before-class) and D211 (no-blank-line-before-class)
"D213", # choice between D212 (multi-line-summary-first-line) and D213 (multi-line-summary-second-line)
"E117", # over-indented
"E241", # multiple-spaces-after-comma
"E501", # line-too-long
"E74", # ambiguous-{variable,class,function}-name
"PLC1901", # compare-to-empty-string
"PLR091", # too-many-* (we find cyclomatic complexity neater)
"PLR1714", # repeated-equality-comparison
"PLR2004", # magic-value-comparison
"PLR6301", # no-self-use
"PTH123", # builtin-open
"PT028", # pytest-parameter-with-default-argument
"RUF001", "RUF002", "RUF003", # ambiguous-unicode-character-{string,docstring,comment}
"S310", # suspicious-url-open-usage
"S311", # suspicious-non-cryptographic-random-usage
"S404", # suspicious-subprocess-import
"TC006", # runtime-cast-value
"TRY003", # raise-vanilla-args
]