Skip to content

Commit

Permalink
Merge pull request #13 from drewwhis/12-sound-file-method
Browse files Browse the repository at this point in the history
#12 correct parameter type for the sound.file method
  • Loading branch information
drewwhis committed Dec 4, 2019
2 parents e86f6cf + 7d3c7bb commit 857be49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pybricks/ev3brick.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pybricks.parameters import Align, Button, Color, ImageFile
from pybricks.parameters import Align, Button, Color, ImageFile, SoundFile
from typing import List, Tuple, Union


Expand Down Expand Up @@ -28,12 +28,12 @@ def beeps(number: int):
...

@staticmethod
def file(file_name: str, volume: int = 100):
def file(file_name: Union[str, SoundFile], volume: int = 100):
"""
Play a sound file.
----------
file_name : str – Path to the sound file, including extension.
file_name : str – Path to the sound file, including extension. Paths can also be one of the SoundFile values.
volume : int - Volume of the sound as a percent. (Default: 100).
"""
Expand Down

0 comments on commit 857be49

Please sign in to comment.