Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 6 additions & 2 deletions adafruit_rtttl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@
import pwmio

AUDIOIO_AVAILABLE = False
HAVE_WAVEFORM_LIBRARY = False
try:
import audioio
from adafruit_waveform import sine

HAVE_WAVEFORM_LIBRARY = True

AUDIOIO_AVAILABLE = True
try:
import audiocore
except ImportError:
audiocore = audioio
except ImportError:
pass
except ImportError as e:
if not HAVE_WAVEFORM_LIBRARY:
raise e

try:
from typing import Optional, Union, Tuple, List
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"sphinx.ext.viewcode",
]

autodoc_mock_imports = ["pulseio", "pwmio", "audioio"]
autodoc_mock_imports = ["pulseio", "pwmio", "audioio", "adafruit_waveform"]

intersphinx_mapping = {
"python": ("https://docs.python.org/3.4", None),
Expand Down