Skip to content

Commit

Permalink
Relax event pattern types (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephine-wolf-oberholtzer authored May 16, 2024
1 parent e93078c commit 1027021
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions supriya/patterns/eventpatterns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Generator, Optional, Type
from typing import Any, Dict, Generator, Optional, Type, Union
from uuid import UUID, uuid4

from uqbar.objects import new
Expand All @@ -13,7 +13,7 @@ class EventPattern(Pattern):
"""

def __init__(
self, event_type: Type[NoteEvent] = NoteEvent, **patterns: Pattern
self, event_type: Type[NoteEvent] = NoteEvent, **patterns: Union[Any, Pattern]
) -> None:
self._event_type = event_type
self._patterns = patterns
Expand Down Expand Up @@ -87,7 +87,9 @@ class UpdatePattern(Pattern):
Akin to SuperCollider's Pbindf.
"""

def __init__(self, pattern: Pattern[Event], **patterns: Pattern) -> None:
def __init__(
self, pattern: Pattern[Event], **patterns: Union[Any, Pattern]
) -> None:
self._pattern = pattern
self._patterns = patterns

Expand Down

0 comments on commit 1027021

Please sign in to comment.