-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathruff.toml
More file actions
69 lines (63 loc) · 2.54 KB
/
ruff.toml
File metadata and controls
69 lines (63 loc) · 2.54 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
# Root Ruff configuration for the entire repository
line-length = 119
extend-exclude = [
# test data and notebooks
"lambdas/indexer/test/data/**",
"lambdas/indexer/test/notebooks/**",
"lambdas/preview/test/data/**",
"lambdas/shared/tests/data/**",
]
[lint]
# Start with basic rule sets, can be expanded later
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"S", # flake8-bandit (security)
]
# Ignore rules that were disabled in pylint or would cause too many changes
ignore = [
"E501", # line-too-long (already handled by line-length setting)
"E731", # lambda assignment
"B008", # function calls in argument defaults
"B904", # raise without from
"S101", # assert usage
"S105", # hardcoded passwords (false positives)
"S106", # hardcoded passwords (false positives)
"S107", # hardcoded passwords (false positives)
"S110", # try-except-pass
"S301", # pickle usage
"S603", # subprocess without shell=True
"S607", # subprocess partial path
# Currently found in existing codebase, to be cleaned up later:
"B007", # Loop control variable not used within loop body
"B011", # Do not assert False
"B018", # Found useless expression
"B028", # No explicit stacklevel keyword argument found
"C408", # Unnecessary dict() call (rewrite as a literal)
"E402", # Module level import not at top of file
"F401", # Imported but unused
"S113", # Probable use of requests call without timeout
"S310", # Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected.
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S324", # Probable use of insecure hash functions
"S606", # Starting a process without a shell
"S608", # Possible SQL injection vector through string-based query construction
"UP006", # Use list instead of List for type annotation
"UP031", # Use format specifiers instead of percent format
"UP032", # Use f-string instead of format call
"UP035", # typing.Tuple is deprecated, use tuple instead
"UP045", # Use `X | None` for type annotations
]
[lint.per-file-ignores]
"docs/**" = ["I001"]
[lint.isort]
known-first-party = ["quilt3", "quilt_shared", "t4_lambda_*"]
combine-as-imports = true
[format]
# Preserve existing quote style until we reformat everything
quote-style = "preserve"