@@ -123,3 +123,55 @@ target-version = ['py38']
123
123
[tool .check-wheel-contents ]
124
124
# W009: Wheel contains multiple toplevel library entries
125
125
ignore = " W009"
126
+
127
+ [tool .ruff ]
128
+ src = [" src" ]
129
+ line-length = 88
130
+ select = [
131
+ " D" , # pydocstyle
132
+ " E" , # pycodestyle
133
+ " F" , # pyflakes
134
+ " I" , # isort
135
+ " UP" , # pyupgrade
136
+ " W" , # pycodestyle
137
+ ]
138
+ ignore = [
139
+ # pycodestyle ignore
140
+ # pytest can do weird low-level things, and we usually know
141
+ # what we're doing when we use type(..) is ...
142
+ " E721" , # Do not compare types, use `isinstance()`
143
+ # pydocstyle ignore
144
+ " D100" , # Missing docstring in public module
145
+ " D101" , # Missing docstring in public class
146
+ " D102" , # Missing docstring in public method
147
+ " D103" , # Missing docstring in public function
148
+ " D104" , # Missing docstring in public package
149
+ " D105" , # Missing docstring in magic method
150
+ " D106" , # Missing docstring in public nested class
151
+ " D107" , # Missing docstring in `__init__`
152
+ " D209" , # [*] Multi-line docstring closing quotes should be on a separate line
153
+ " D205" , # 1 blank line required between summary line and description
154
+ " D400" , # First line should end with a period
155
+ " D401" , # First line of docstring should be in imperative mood
156
+ " D402" , # First line should not be the function's signature
157
+ " D404" , # First word of the docstring should not be "This"
158
+ " D415" , # First line should end with a period, question mark, or exclamation point
159
+ ]
160
+
161
+ [tool .ruff .format ]
162
+ docstring-code-format = true
163
+
164
+ [tool .ruff .lint .pycodestyle ]
165
+ # In order to be able to format for 88 char in ruff format
166
+ max-line-length = 120
167
+
168
+ [tool .ruff .lint .pydocstyle ]
169
+ convention = " pep257"
170
+
171
+ [tool .ruff .lint .isort ]
172
+ force-single-line = true
173
+ combine-as-imports = true
174
+ force-sort-within-sections = true
175
+ order-by-type = false
176
+ known-local-folder = [" pytest" , " _pytest" ]
177
+ lines-after-imports = 2
0 commit comments