This commit is contained in:
dherrada 2021-11-05 03:16:35 -04:00
parent ca9c763734
commit 953991edad
2 changed files with 4 additions and 2 deletions

View file

@ -24,7 +24,7 @@ repos:
name: pylint (library code)
types: [python]
args:
- --disable=consider-using-f-string
- --disable=consider-using-f-string,duplicate-code
exclude: "^(docs/|examples/|tests/|setup.py$)"
- id: pylint
name: pylint (example code)

View file

@ -754,7 +754,9 @@ class PyBadgerBase:
self.stop_tone()
self._enable_speaker(enable=True)
with self._audio_out(board.SPEAKER) as audio: # pylint: disable=not-callable
wavefile = audiocore.WaveFile(open(file_name, "rb"))
wavefile = audiocore.WaveFile(
open(file_name, "rb") # pylint: disable=consider-using-with
)
audio.play(wavefile)
while audio.playing:
pass