Skip to content

Commit c160c27

Browse files
committed
Use pyglet.media.Source instead of a Union type
1 parent e2b620b commit c160c27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arcade/sound.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from typing import Optional, Union
1212

1313
import pyglet
14+
from pyglet.media import Source
1415

1516
from arcade.resources import resolve
1617

@@ -37,7 +38,7 @@ def __init__(self, file_name: Union[str, Path], streaming: bool = False):
3738
raise FileNotFoundError(f"The sound file '{file_name}' is not a file or can't be read.")
3839
self.file_name = str(file_name)
3940

40-
self.source: Union[media.StaticSource, media.StreamingSource] = media.load(
41+
self.source: Source = media.load(
4142
self.file_name, streaming=streaming
4243
)
4344

0 commit comments

Comments
 (0)