Skip to content

Commit 7c37dad

Browse files
authored
[Python] Sort __all__ (#3517)
## Changes Ensure that `__all__` is sorted through ruff. See https://docs.astral.sh/ruff/rules/unsorted-dunder-all/ ## Why Use a common convention for `__all__` to make code more readable and idiomatic.
1 parent 989d6b8 commit 7c37dad

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

experimental/python/databricks/bundles/core/_load.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
__all__ = [
1616
"load_resources_from_current_package_module",
17-
"load_resources_from_package_module",
18-
"load_resources_from_modules",
1917
"load_resources_from_module",
18+
"load_resources_from_modules",
19+
"load_resources_from_package_module",
2020
]
2121

2222
"""

experimental/python/databricks/bundles/core/_variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
__all__ = [
1212
"Variable",
1313
"VariableOr",
14-
"VariableOrOptional",
1514
"VariableOrDict",
1615
"VariableOrList",
16+
"VariableOrOptional",
1717
"variables",
1818
]
1919

experimental/python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ lint.select = [
6868
"N", # pep8-naming
6969
"F", # flake8
7070
"I", # isort
71+
"RUF022", # sort __all__, see: https://docs.astral.sh/ruff/rules/unsorted-dunder-all/
7172
]

0 commit comments

Comments
 (0)