-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
96 lines (78 loc) · 3.6 KB
/
ruff.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
96
# https://docs.astral.sh/ruff/settings/#exclude
exclude = [
"src/release_helper/issue_management/linear/graphql_client/",
]
line-length = 88 # https://docs.astral.sh/ruff/settings/#line-length
indent-width = 4 # https://docs.astral.sh/ruff/settings/#indent-width
# https://docs.astral.sh/ruff/settings/#format
[format]
docstring-code-format = true # https://docs.astral.sh/ruff/settings/#format_docstring-code-format
docstring-code-line-length = "dynamic" # https://docs.astral.sh/ruff/settings/#format_docstring-code-line-length
# Like Black, use double quotes for strings.
quote-style = "double" # https://docs.astral.sh/ruff/settings/#format_quote-style
# Like Black, indent with spaces, rather than tabs.
indent-style = "space" # https://docs.astral.sh/ruff/settings/#format_indent-style
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false # https://docs.astral.sh/ruff/settings/#format_skip-magic-trailing-comma
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto" # https://docs.astral.sh/ruff/settings/#format_line-ending
# https://docs.astral.sh/ruff/settings/#lint
[lint]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = ["ALL"]
ignore = [# https://docs.astral.sh/ruff/settings/#lint_ignore
# Recommended to ignore: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
"E501",
# Manually added
"ANN101", # Missing type annotation for self in method
"ANN204", # Missing type annotation for self in method
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in __init__
"RET504", # Missing return type annotation
"PLR0913",
]
[lint.per-file-ignores]
"test_*.py" = [
"S101", # Use of assert detected - https://docs.astral.sh/ruff/rules/assert/
]
[lint.pydocstyle]
convention = "google" # https://docs.astral.sh/ruff/settings/#lint_pydocstyle_convention
[lint.pyflakes]
extend-generics = [] # https://docs.astral.sh/ruff/settings/#lint_pyflakes_extend-generics
[lint.pylint]
max-branches = 8 # https://docs.astral.sh/ruff/settings/#lint_pylint_max-branches
max-locals = 15 # https://docs.astral.sh/ruff/settings/#lint_pylint_max-locals
max-nested-blocks = 5 # https://docs.astral.sh/ruff/settings/#lint_pylint_max-nested-blocks
max-positional-args = 0 # https://docs.astral.sh/ruff/settings/#lint_pylint_max-positional-args
[lint.isort]
default-section = "third-party" # https://docs.astral.sh/ruff/settings/#lint_isort_default-section
# as per https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
# these are the default values and should not be adjusted
force-single-line = false # https://docs.astral.sh/ruff/settings/#lint_isort_force-single-line
force-wrap-aliases = false # https://docs.astral.sh/ruff/settings/#lint_isort_force-wrap-aliases
lines-after-imports = 2 # https://docs.astral.sh/ruff/settings/#lint_isort_lines-after-imports
lines-between-types = 0 # https://docs.astral.sh/ruff/settings/#lint_isort_lines-between-types
split-on-trailing-comma = true # https://docs.astral.sh/ruff/settings/#lint_isort_split-on-trailing-comma