archive
This commit is contained in:
182 files changed
+18062
-277
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
Modus OSD modules package.
|
||||
Contains UI components and functionality modules
|
||||
"""
|
||||
|
||||
import importlib
|
||||
import inspect
|
||||
import pkgutil
|
||||
|
||||
__all__ = []
|
||||
|
||||
for module_info in pkgutil.iter_modules(__path__):
|
||||
module_name = module_info.name
|
||||
module = importlib.import_module(f"{__name__}.{module_name}")
|
||||
|
||||
for attr_name in dir(module):
|
||||
attr_value = getattr(module, attr_name)
|
||||
if (
|
||||
isinstance(attr_value, type)
|
||||
and (attr_name.endswith("OSDContainer") or attr_name == "AnimatedScale")
|
||||
and inspect.getmodule(attr_value) is module
|
||||
):
|
||||
globals()[attr_name] = attr_value
|
||||
__all__.append(attr_name)
|
||||
Reference in new issue
Block a user