forked from withmartian/ares
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
93 lines (82 loc) · 2.04 KB
/
ruff.toml
File metadata and controls
93 lines (82 loc) · 2.04 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
target-version = "py313"
line-length = 120
indent-width = 4
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".env",
]
[lint]
# Enable pycodestyle (`E`), Pyflakes (`F`), and isort (`I`) codes
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"W", # pycodestyle warnings
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"LOG", # flake8-logging
"G", # flake8-logging-format
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
# "TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"Q", # flake8-quotes
"RUF", # Ruff-specific rules
]
ignore = [
"D107", # Ignore missing docstring in __init__
"D203", # Ignore one blank line before class docstring (Google prefers D211)
"D213", # Ignore multi-line summary on first line (Google prefers D212)
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[lint.isort]
known-first-party = [
"code_sandbox",
"extracting",
"judging",
"learning",
"serverless",
]
# Google style requires this.
force-single-line = true
single-line-exclusions = ["typing", "collections.abc"]
# Like isort, don't sort within a `from ... import ...` block.
split-on-trailing-comma = false
# Don't separate `from ... import ...` and `import ...` blocks.
force-sort-within-sections = true
[lint.pydocstyle]
convention = "google"
# max-doc-length = 100
[format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"