Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions agent/custom/action/SoundTrigger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@


def __getattr__(name: str):
"""Lazy import of module attributes.

This function allows lazy importing of the Ear and Dodger classes
when accessed as module attributes.

Args:
name (str): The name of the attribute to import.

Returns:
The requested class.

Raises:
AttributeError: If the attribute name is not in __all__.
"""
if name == "Ear":
from .SoundListener import Ear
return Ear
Expand Down
Loading