-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathruff.toml
More file actions
47 lines (40 loc) · 1.77 KB
/
ruff.toml
File metadata and controls
47 lines (40 loc) · 1.77 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
# Minimum Python syntax support
target-version = "py39"
line-length = 120
exclude = [
".git",
"**/__pycache__",
"/**/doc/conf.py",
"/**/__init__.py",
"setup.py",
]
[lint]
ignore = [
"E266", # Too many leading '#' for block comment
"B006", # do not use mutable data structures for argument defaults (too many false positives)
"E501", # line length, exceeded by some docstrings
"W605", # TODO (to be fixed), invalid escape sequence, necessary for sphinx directives in docstrings but should switch to raw string
"D301", # Same reason as W605
"D10", # D100-107, missing docstring in public function, class etc (yes we should have docstrings for all public methods, but that is a pipe dream)
"D400", # First line of docstring should end with a period (assumes the summary fits on one line, which is not always the case)
"D205", # 1 blank line required between summary line and description (Makes same assumption as D400)
"D200", # One-line docstring should fit on one line, don't like this because it enforces inconsistent formatting between one-line and multi-line docstrings
"D202", # No blank lines allowed after function docstring (silly rule, if formatter doesn't enforce it then checks shouldn't either)
"D401", # First line of docstring should be in imperative mood (silly rule)
"D404", # First word of the docstring should not be "This" (Probably a good rule to follow going forward but it occurs in so many places in our code and it's not a big enough issue to warrant fixing)
]
select = [
"B",
"D",
"E",
"F",
"W",
]
[lint.pydocstyle]
convention = "numpy"
[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[lint.per-file-ignores]
"tests/*" = ["D"] # Ignore docstring checks in tests