-
Notifications
You must be signed in to change notification settings - Fork 3
/
ruff.toml
87 lines (84 loc) · 2.96 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
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"
line-length = 120
extend-exclude=[
"__pycache__",
"build",
"tools/**",
]
lint.extend-select = [
"ALL",
]
lint.extend-ignore = [
"I", # Ignore isort
"ANN001", # Missing type annotation for function argument
"ANN002", # Missing type annotation for variable
"ANN003", # Missing type annotation for keyword
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private function
"ANN205", # Missing return type annotation for staticmethod
"ANN206", # Missing return type annotation for classmethod
"COM812", # May cause conflicts when used with the formatter
"D200", # One-line docstring should fit on one line
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D404", # First word of the docstring should not be "This"
"E501", # Line too long
"F403", # unable to detect undefined names,
"FIX001", # Line contains FIXME, consider resolving the issue
"FIX002", # Line contains TODO, consider resolving the issue
"ISC001", # May cause conflicts when used with the formatter
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison
"SLF001", # Private member accessed
"TD001", # Invalid TODO tag: `FIXME`
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
]
[lint.per-file-ignores]
"examples/*.py" = [
"B018", # Not print but display
"D400", # First line should end with a period, question mark, or exclamation point
"ERA001", # Commented out code
"INP001", # Implicit namespace package
"T201", # Use print
]
"docs/conf.py" = [
"D100", # Missing docstring in public module
"INP001", # conf.py is part of an implicit namespace package
"E402", # Module level import not at top of file
"ERA001", # Found commented-out code
]
"setup.py" = [
"D100", # Missing docstring in public module
]
"*tests/__init__.py" = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
]
"*tests/*/__init__.py" = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
]
"test_*.py" = [
"D100", # Missing docstring in public module
"D103", # Missing docstring in public function
"N806", # in function should be lowercase
"S101", # Use of `assert` detected
]
"*version.py" = [
"D100", # Missing docstring in public module
]
"*conftest.py" = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
]
[lint.pydocstyle]
convention = "numpy"
[format]
docstring-code-format = true
docstring-code-line-length = 80
indent-style = "space"
quote-style = "double"