You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Sort __all__ list guideline instruction (#433)
Closes#370
### Summary of Changes
Sorted the entries in `__all__` list in `__init__.py` files and added an
instruction to the guidelines.
---------
Co-authored-by: megalinter-bot <[email protected]>
Co-authored-by: Lars Reimann <[email protected]>
Co-authored-by: Severin Paul Höfer <[email protected]>
Copy file name to clipboardExpand all lines: docs/development/guidelines.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,27 @@ The user should not have to deal with exceptions that are defined in the wrapper
205
205
return pd.read_csv(path) # May raise a pd.ParserError
206
206
```
207
207
208
+
### Sort entries in `__all__` lists alphabetically
209
+
The entries in the `__all__` list in `__init__.py` files should be sorted alphabetically. This helps reduce the likelihood of merge conflicts when new entries are introduced on different branches.
210
+
!!! success "**DO** (library code):"
211
+
212
+
```py
213
+
__all__ = [
214
+
"ColumnSizeError",
215
+
"DuplicateColumnNameError",
216
+
"MissingValuesColumnError"
217
+
]
218
+
```
219
+
!!! failure "**DON'T** (library code):"
220
+
221
+
```py
222
+
__all__ = [
223
+
"MissingValuesColumnError",
224
+
"ColumnSizeError",
225
+
"DuplicateColumnNameError"
226
+
]
227
+
```
228
+
208
229
### Group API elements by task
209
230
210
231
Packages should correspond to a specific task like classification or imputation. This eases discovery and makes it easy to switch between different solutions for the same task.
0 commit comments