Build the import list dynamically
This commit is contained in:
parent
5102077443
commit
63607e3d93
|
@ -1,4 +1,13 @@
|
||||||
# FIXME: build this dynamically
|
import os
|
||||||
__all__ = [
|
import pathlib
|
||||||
"account", "application", "backup", "help", "region", "vpc"
|
|
||||||
]
|
# Not pretty but it works
|
||||||
|
|
||||||
|
CMD_PATH = os.path.dirname(pathlib.Path(__file__).absolute())
|
||||||
|
__all__ = [ ]
|
||||||
|
|
||||||
|
for file in os.listdir(CMD_PATH):
|
||||||
|
path = os.path.join(CMD_PATH, file)
|
||||||
|
|
||||||
|
if os.path.isfile(path) and file.endswith(".py") and file != "__init__.py":
|
||||||
|
__all__.append(file[:-3])
|
||||||
|
|
Loading…
Reference in New Issue