Skip to content

Commit 53ae7cd

Browse files
authored
Merge pull request #51 from adafruit/patch-fix
Linted
2 parents ca9c763 + 953991e commit 53ae7cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
name: pylint (library code)
2525
types: [python]
2626
args:
27-
- --disable=consider-using-f-string
27+
- --disable=consider-using-f-string,duplicate-code
2828
exclude: "^(docs/|examples/|tests/|setup.py$)"
2929
- id: pylint
3030
name: pylint (example code)

adafruit_pybadger/pybadger_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,9 @@ def play_file(self, file_name):
754754
self.stop_tone()
755755
self._enable_speaker(enable=True)
756756
with self._audio_out(board.SPEAKER) as audio: # pylint: disable=not-callable
757-
wavefile = audiocore.WaveFile(open(file_name, "rb"))
757+
wavefile = audiocore.WaveFile(
758+
open(file_name, "rb") # pylint: disable=consider-using-with
759+
)
758760
audio.play(wavefile)
759761
while audio.playing:
760762
pass

0 commit comments

Comments
 (0)