-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ruff.toml
134 lines (127 loc) · 2.5 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
fix = true
unsafe-fixes = true
preview = true
target-version = "py39"
src = ["src"]
[lint]
task-tags = ["TODO"]
ignore = [
# Missing type annotation for `self` in method.
"ANN101",
# Missing type annotation for `cls` in classmethod.
"ANN102",
# Dynamically typed expressions (typing.Any) are disallowed.
"ANN401",
# Checks for undocumented magic method definitions.
"D105",
# Missing argument description in the docstring.
"D417",
# Conflicts with ruff format.
"E203",
# Avoid unexpected behavior with the formatter.
"ISC001",
# Numpy 2 deprecation.
"NPY201",
# Too many arguments in function definition.
"PLR0913",
# `subprocess.run` without explicit `check` argument.
"PLR2004",
# Too many public methods.
"PLR0904",
# Too many branches.
"PLR0912",
# Too many statements.
"PLR0915",
# Too many return statements.
"PLR0911",
# `for` loop variable `name` overwritten by assignment target.
"PLW1510",
# Magic value used in comparison.
"PLW2901",
# Bad or misspelled dunder method name `_repr_html_`.
"PLW3201",
# Object does not implement `__hash__` method.
"PLW1641",
# Fixture does not return anything, add leading underscore.
"PT004",
# Checks for noqa directives that are no longer applicable.
"RUF100",
# Checks for long exception messages that are not defined in the exception class itself.
"TRY003",
]
select = [
"A",
# "ANN",
"ASYNC",
"B",
"BLE",
# "C",
"C4",
"D",
# "DOC",
"E",
"EM",
"F",
# "FA",
# "FBT",
"FLY",
"FURB",
"G",
"I",
"ISC",
"INP",
"LOG",
"Q",
"N",
"NPY",
# "PL",
# "PD",
"PT",
"PIE",
"PGH",
"PTH",
"PYI",
"PERF",
"RET",
"RSE",
"RUF",
# "S",
"SIM",
# "SLF",
"SLOT",
"T",
"T10",
"T20",
"TCH",
"TRY",
"W",
"UP",
"YTT",
]
[lint.flake8-type-checking]
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
"gemseo.core.grammars.pydantic_ndarray.BaseModelWithNDArray",
]
[lint.isort]
force-single-line = true
#required-imports = ["from __future__ import annotations"]
[lint.pydocstyle]
convention = "google"
[lint.per-file-ignores]
"*.ipynb" = ["RET504"]
"tests/*.py" = ["D", "PT009", "PT011", "PT027", "PTH"]
"docs/*.py" = [
"T",
"D",
"B018",
"PTH",
"E501",
"PERF",
"A001",
"RET504",
"INP001",
]
[format]
docstring-code-format = true
docstring-code-line-length = 75