Skip to content

Commit c13866a

Browse files
committed
Lints'n'Sphinx.
1 parent defdf2a commit c13866a

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

adafruit_circuitplayground/circuit_playground_base.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
# THE SOFTWARE.
2323

24-
# We have a lot of attributes for this complex library.
25-
# pylint: disable=too-many-instance-attributes
24+
# We have a lot of attributes for this complex library, as well as a lot of documentation.
25+
# pylint: disable=too-many-instance-attributes, too-many-lines
2626

2727
"""
2828
`adafruit_circuitplayground.circuit_playground_base`
@@ -39,10 +39,7 @@
3939
import math
4040
import array
4141
import time
42-
try:
43-
import audiocore
44-
except ImportError:
45-
audiocore = audioio
42+
import audiocore
4643
import adafruit_lis3dh
4744
import adafruit_thermistor
4845
import analogio
@@ -840,7 +837,7 @@ def _generate_sample(self, length=100):
840837
if self._sample is not None:
841838
return
842839
self._sine_wave = array.array("H", self._sine_sample(length))
843-
self._sample = self._audio_out(board.SPEAKER)
840+
self._sample = self._audio_out(board.SPEAKER) # pylint: disable=not-callable
844841
self._sine_wave_sample = audiocore.RawSample(self._sine_wave)
845842

846843
def play_tone(self, frequency, duration):
@@ -997,7 +994,7 @@ def play_file(self, file_name):
997994
# Play a specified file.
998995
self.stop_tone()
999996
self._speaker_enable.value = True
1000-
with self._audio_out(board.SPEAKER) as audio:
997+
with self._audio_out(board.SPEAKER) as audio: # pylint: disable=not-callable
1001998
wavefile = audiocore.WaveFile(open(file_name, "rb"))
1002999
audio.play(wavefile)
10031000
while audio.playing:

adafruit_circuitplayground/express.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
* Author(s): Kattni Rembor, Scott Shawcroft
3535
"""
3636

37+
import sys
3738
import audioio
3839
import digitalio
39-
import sys
4040
# pylint: disable=wrong-import-position
4141
try:
4242
lib_index = sys.path.index("/lib") # pylint: disable=invalid-name

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Libraries we depend on but don't need for generating docs.
2323
autodoc_mock_imports = ["board", "analogio", "digitalio", "neopixel", "adafruit_thermistor",
2424
"audioio", "touchio", "adafruit_lis3dh", "busio", "gamepad", "audiocore",
25-
"audiopwmio"]
25+
"audiopwmio", "audiobusio"]
2626

2727
# Add any paths that contain templates here, relative to this directory.
2828
templates_path = ['_templates']

0 commit comments

Comments
 (0)