-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
47 lines (41 loc) · 1.99 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
select = [
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"ANN", # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"C90", # https://docs.astral.sh/ruff/rules/#mccabe-c90
"D", # https://docs.astral.sh/ruff/rules/#pydocstyle-d
"DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"E", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"ERA", # https://docs.astral.sh/ruff/rules/#eradicate-era
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
]
ignore = [
"ANN101", # Missing type annotation for self in method
"ANN102", # Missing type annotation for cls in classmethod
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
'D206', # ignore for compatibility with the formatter
'E501', # ignore for compatibility with the formatter
'W191', # ignore for compatibility with the formatter
]
unfixable = [
"ERA", # we might want to comment out code during development.
"F841", # unused variables may occur during development.
]
src = ["src", "tests"]
[per-file-ignores]
"__init__.py" = ["F401"] # Unused imports are allowed in __init__.py files
"tests/**/*.py" = ["S101"] # Allow assert in tests
[mccabe]
max-complexity = 5 # ruff defaults to 10 but we prefer flake8's default of 5
[pydocstyle]
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
convention = "google"