-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
40 lines (35 loc) · 838 Bytes
/
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
line-length = 120
indent-width = 4
target-version = "py310"
src = ["storch"]
[lint.per-file-ignores]
"__init__.py" = ["F401", "F403", "F405"]
[lint]
select = [
"B",
"E",
"F",
"C4",
"SIM",
"W",
"NPY",
"PIE",
"PL",
"PYI",
"RUF",
"TRY",
"D"
]
ignore = [
"C408", # dict() statement. I like dict().
"PLR0911", # Too many return.
"PLR0912", # Too many branches.
"PLR0913", # Too many args.
"TRY002", # Create Exception class.
"TRY003", # Long message outside exception class.
"NPY002", # numpy.random.Generator. Most torch programs use np.random.seed().
"PLR0402", # import torch.nn as nn -> from torch import nn.
"SIM108", # if: a=...; else: a=... -> a = ... if else ...;. I like using if-else in some cases.
]
[format]
quote-style = "single"