import yaml | |
from typing import Any | |
def load_commands_from_yaml(file_path: str) -> Any: | |
try: | |
with open(file_path, 'r') as file: | |
commands_data = yaml.safe_load(file) | |
print(commands_data) | |
return commands_data.get('commands', []) | |
except IOError as e: | |
print(f"Error: {e}") |