Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 28, 2023
1 parent 8c54db0 commit 43c3fe0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ovos_utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@
from typing import Callable, Optional, Union

import ovos_utils.messagebus
from ovos_utils.intents.intent_service_interface import to_alnum
from ovos_utils.log import LOG, log_deprecation, deprecated
from ovos_utils.log import LOG


def to_alnum(skill_id: str) -> str:
"""
Convert a skill id to only alphanumeric characters
Non-alphanumeric characters are converted to "_"
Args:
skill_id (str): identifier to be converted
Returns:
(str) String of letters
"""
return ''.join(c if c.isalnum() else '_' for c in str(skill_id))


def unmunge_message(message, skill_id: str):
Expand Down

0 comments on commit 43c3fe0

Please sign in to comment.