-
Notifications
You must be signed in to change notification settings - Fork 36
/
.ruff.toml
168 lines (151 loc) · 3.06 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
line-length = 160
target-version = "py37"
exclude = [
"*.pyi",
]
# extend-select = [
# "UP030",
# "UP031",
# "UP032",
# ]
[lint]
select = ["ALL"]
extend-ignore = [
"FIX002", # TODO are OK
"FIX004", # HACK is OK
"D415", # First docstring line should end with a period, question mark, or exclamation point
"DTZ004", # utcfromtimestamp makes sense for atmosphere model
"PGH003", # type ignoring makes sense for numba-related things
"S102", # Yes, exec is dangerous but it can be quite useful as well
"PYI056", # changing __all__
"RUF012", # not using typing today
"PERF403", # obvious, use an autofix if one becomes available
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # PERF401 Use a list comprehension to create a transformed list
# chemicals specific
"E701", # lots of this here
"S302", # marshal is OK
"SIM116", # 3 if statements does not require a dict
# maybe these
"PLE0605",
"PLE0604",
"TD002","TD003","TD004","TD005",
# Originally from astropy's pyproject.toml, see about removing many of them later
"A00",
"ANN",
"ARG001", "ARG002", "ARG003", "ARG004", "ARG005",
"B004",
"B005",
"B006",
"B007",
"B008",
"B015",
"B018",
"B020",
"B023",
"B024",
"B026",
"B028",
"B904",
"B905",
"BLE001",
"C400", "C406", "C408", "C413", "C416",
"C414",
"C417",
"C901",
"COM812",
"COM818",
"COM819",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D200",
"D203",
"D205",
"D212", "D213",
"D300",
"D301",
"D402",
"D403",
"D404",
"D410",
"D400",
"D401",
"D413",
"D414",
"D416",
"D417",
"D419",
"DTZ001", "DTZ003", "DTZ005", "DTZ007",
"E501",
# "E711",
"E721",
"E731",
"E741",
"EM",
"ERA001",
"F841",
"E722",
"FBT001", "FBT002", "FBT003",
"N8",
"PD",
"PLC1901",
"PLR2004",
"PLR0911",
"PLR0912",
"PLR5501",
"PLR0913",
"PLR0915",
"PLW0602",
"PLW2901",
"PLW0603",
"PT",
"PTH",
"RET",
"RSE102",
"RUF001", "RUF003",
"RUF005", # this one is not micropython compatible
"S101",
"S105",
"S110",
"S112",
"S301",
"S311",
"S324",
"S506",
"S310",
"S321",
"S603",
"S605",
"S607",
"S608",
"SIM102",
"SIM105",
"SIM108",
"SIM114",
"SIM115",
"SIM117",
"SIM118",
"SIM201",
"SIM202",
"SIM300",
"SLF001",
"T201",
"TRY002",
"TRY003",
"TRY004",
"B904",
"TRY201",
"TRY300",
"TRY301",
"TRY400",
"Q000",
"Q002",
"PYI024", # PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple
]
[lint.mccabe]
max-complexity = 10