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
members_order: Order | list[Order] = 'alphabetical'
1631
1635
1632
1636
```
1633
1637
1634
1638
The members ordering to use.
1635
1639
1636
-
- `alphabetical`: order by the members names,
1640
+
- `__all__`: order members according to `__all__` module attributes, if declared;
1641
+
- `alphabetical`: order members alphabetically;
1637
1642
- `source`: order members as they appear in the source file.
1638
1643
1644
+
Since `__all__` is a module-only attribute, it can't be used to sort class members, therefore the `members_order` option accepts a list of ordering methods, indicating ordering preferences.
members_order: Order | list[Order] = 'alphabetical'
2368
2375
2369
2376
```
2370
2377
2371
2378
The members ordering to use.
2372
2379
2373
-
- `alphabetical`: order by the members names,
2380
+
- `__all__`: order members according to `__all__` module attributes, if declared;
2381
+
- `alphabetical`: order members alphabetically;
2374
2382
- `source`: order members as they appear in the source file.
2375
2383
2384
+
Since `__all__` is a module-only attribute, it can't be used to sort class members, therefore the `members_order` option accepts a list of ordering methods, indicating ordering preferences.
Copy file name to clipboardExpand all lines: schema.json
+24-8Lines changed: 24 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -469,15 +469,31 @@
469
469
"title": "members"
470
470
},
471
471
"members_order": {
472
-
"default": "alphabetical",
473
-
"description": "The members ordering to use.\n\n- `alphabetical`: order by the members names,\n- `source`: order members as they appear in the source file.",
474
-
"enum": [
475
-
"alphabetical",
476
-
"source"
472
+
"anyOf": [
473
+
{
474
+
"enum": [
475
+
"__all__",
476
+
"alphabetical",
477
+
"source"
478
+
],
479
+
"type": "string"
480
+
},
481
+
{
482
+
"items": {
483
+
"enum": [
484
+
"__all__",
485
+
"alphabetical",
486
+
"source"
487
+
],
488
+
"type": "string"
489
+
},
490
+
"type": "array"
491
+
}
477
492
],
478
-
"markdownDescription": "[DOCUMENTATION](https://mkdocstrings.github.io/python/usage/configuration/members/#members_order)\n\nThe members ordering to use.\n\n- `alphabetical`: order by the members names,\n- `source`: order members as they appear in the source file.",
479
-
"title": "members_order",
480
-
"type": "string"
493
+
"default": "alphabetical",
494
+
"description": "The members ordering to use.\n\n- `__all__`: order members according to `__all__` module attributes, if declared;\n- `alphabetical`: order members alphabetically;\n- `source`: order members as they appear in the source file.\n\nSince `__all__` is a module-only attribute, it can't be used to sort class members,\ntherefore the `members_order` option accepts a list of ordering methods,\nindicating ordering preferences.",
495
+
"markdownDescription": "[DOCUMENTATION](https://mkdocstrings.github.io/python/usage/configuration/members/#members_order)\n\nThe members ordering to use.\n\n- `__all__`: order members according to `__all__` module attributes, if declared;\n- `alphabetical`: order members alphabetically;\n- `source`: order members as they appear in the source file.\n\nSince `__all__` is a module-only attribute, it can't be used to sort class members,\ntherefore the `members_order` option accepts a list of ordering methods,\nindicating ordering preferences.",
0 commit comments