-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
89 lines (77 loc) · 2.72 KB
/
pyproject.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
[tool.ruff]
target-version = "py311"
select = ["ALL"]
fix = true
extend-ignore = [
"ICN001", # numpy should be np, but different convention here.
# Docstrings
"D103", # missing docstring in public function
"D107",
"D203",
"D212",
"D213",
"D402",
"D413",
"D415",
"D416",
"D417",
# Others.
"D404", # Do not start module docstring with "This".
"RET504", # unnecessary variable assignment before return.
"S101", # raise errors for asserts.
"B905", # strict parameter for zip that was implemented in py310.
"ANN101", # type annotating self
"ANN102", # type annotating cls
"FBT", # flake8-boolean-trap
"EM", # flake8-errmsg
"ANN401", # flake8-annotate typing.Any
"PD", # pandas-vet
"E731", # do not assign a lambda expression, use a def
"RET", # unnecessary elif or else statements after return, rais, continue, ...
"S324", # Probable use of insecure hash function.
"COM812", # trailing comma missing, but black takes care of that
"PT007", # wrong type in parametrize, gave false positives
"DTZ001", # use of `datetime.datetime()` without `tzinfo` argument is not allowed
"DTZ002", # use of `datetime.datetime.today()` is not allowed
"PT012", # `pytest.raises()` block should contain a single simple statement
"PLR5501", # elif not supported by Jax converter
"TRY003", # Avoid specifying long messages outside the exception class
"FIX002", # Line contains TODO -- Use stuff from TD area.
# Things we are not sure we want
# ==============================
"SIM102", # Use single if statement instead of nested if statements
"SIM108", # Use ternary operator instead of if-else block
"SIM117", # do not use nested with statements
"BLE001", # Do not catch blind exceptions (even after handling some specific ones)
"PLR2004", # Magic values used in comparison
"PT006", # Allows only lists of tuples in parametrize, even if single argument
# Things ignored during transition phase
# ======================================
"D", # docstrings
"ANN", # missing annotations
"C901", # function too complex
"PT011", # pytest raises without match statement
"INP001", # implicit namespace packages without init.
]
exclude = [
"dashboard"
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.mypy]
files = ["src"]
check_untyped_defs = true
disallow_any_generics = false
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.nbqa.config]
black = "pyproject.toml"
[tool.nbqa.mutate]
black = 1
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"