diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b9fadc..43d1385 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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) diff --git a/adafruit_pybadger/pybadger_base.py b/adafruit_pybadger/pybadger_base.py index 646249c..125e55f 100644 --- a/adafruit_pybadger/pybadger_base.py +++ b/adafruit_pybadger/pybadger_base.py @@ -754,7 +754,9 @@ def play_file(self, file_name): 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