Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix type hints #183

Merged
merged 1 commit into from
Jan 31, 2024
Merged
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
26 changes: 13 additions & 13 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2183,8 +2183,8 @@ def schedule_event(self, handler: callable,
return self.event_scheduler.schedule_event(handler, when, data, name,
context=context)

def schedule_repeating_event(self, handler: callable,
when: Union[int, float, datetime.datetime],
def schedule_repeating_event(self, handler: Callable,
when: Optional[Union[int, float, datetime.datetime]],
frequency: Union[int, float],
data: Optional[dict] = None,
name: Optional[str] = None,
Expand All @@ -2193,17 +2193,17 @@ def schedule_repeating_event(self, handler: callable,
Schedule a repeating event.

Args:
handler: method to be called
when (datetime): time (in system timezone) for first
calling the handler, or None to
initially trigger <frequency> seconds
from now
frequency (float/int): time in seconds between calls
data (dict, optional): data to send when the handler is called
name (str, optional): reference name, must be unique
context (dict, optional): context (dict, optional): message
context to send when the handler
is called
handler (callable): method to be called
when (datetime, optional): time (in system timezone) for first
calling the handler, or None to
initially trigger <frequency> seconds
from now
frequency (float/int): time in seconds between calls
data (dict, optional): data to send when the handler is called
name (str, optional): reference name, must be unique
context (dict, optional): context (dict, optional): message
context to send when the handler
is called
"""
message = dig_for_message()
context = context or message.context if message else {}
Expand Down
Loading