-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathruff.toml
More file actions
121 lines (113 loc) · 2.43 KB
/
ruff.toml
File metadata and controls
121 lines (113 loc) · 2.43 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
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
extend-exclude = [
".numba_cache",
".venv",
"dist-conda",
]
extend-include = [
"*.ipynb",
]
fix = true
# unsafe-fixes = true
[format]
docstring-code-format = true
preview = true # needed for markdown support
[lint]
preview = true
select = [
"ALL",
]
# fixable/unfixable
# fixable = ["ALL"]
unfixable = [
"ERA",
"PLR6104",
"T",
]
# ignores
ignore = [
"ANN401", # - Any ok sometimes
"COM", # - flake8-commas, formatter should take care of this?
"CPY", # - Don't require copyright
"D105", # - Missing magic method docstring
"D107", # - Missing docstring in __init__
"D203", # - 1 blank line required before class docstring
"D205", # - blank line after summary
"D212", # - Multi-line docstring summary should start at the first line
"D400", # - First line should end with a period
"D401", # - First line of docstring should be in imperative mood: "{first_line}"
"DOC201", # - Missing return from documentation
"DOC501", # - Missing raises from documentation
"E501", # - line too long - let formatter fix this
"E731", # - do not assign a lambda expression, use a def
"FBT", # - bools are ok
"PLC0415", # - import should be at top level (leads to issues with imports in func?)
"S404", # - Want to use subprocess sometimes
"S603", # - subprocess-without-shell-equals-true
"S607", # - start-process-with-partial-path
"TID252", # - Allow relative imports
]
[lint.isort]
known-first-party = [
"analphipy",
]
[lint.pydocstyle]
convention = "numpy"
[lint.pylint]
max-args = 15
max-positional-args = 15
max-public-methods = 30
[lint.ruff]
strictly-empty-init-modules = false
[lint.per-file-ignores]
"**/*.ipynb" = [
"B018",
"D100",
"INP001",
]
"docs/conf.py" = [
"ERA",
"INP001",
]
"noxfile.py" = [
"RUF009",
]
"tests/*.py" = [
"D",
"S101",
]
"tools/*.py" = [
"A",
"D102",
"DOC402",
"S",
"SLF001",
]
# Project specific ignores (avoid changing per-file-ignores directly)
[lint.extend-per-file-ignores]
# "path/to/file.py" = [ ... ]
"**/*.ipynb" = [
"ANN001",
"ANN201",
"D103",
"E302",
"E402",
]
"src/**/base_potential.py" = [
"ARG002",
"DOC202",
"PLR6301",
]
"src/**/norofrenkel.py" = [
"N802",
"N803",
"N806",
]
"src/**/potential.py" = [
"D102",
]
"tests/*.py" = [
"ANN",
"N802",
"N806",
"PT011",
]