Skip to content

Linted. #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Linted. #111

merged 2 commits into from
Nov 5, 2021

Conversation

kattni
Copy link
Contributor

@kattni kattni commented Nov 5, 2021

No description provided.

@kattni kattni requested review from evaherrada and a team November 5, 2021 20:21
@@ -161,7 +161,9 @@ def play_mp3(self, file_name):
with self._audio_out(
board.SPEAKER
) as audio: # pylint: disable=not-callable
mp3file = audiomp3.MP3Decoder(open(file_name, "rb"))
mp3file = audiomp3.MP3Decoder(
open(file_name, "rb") # pylint: disable=consider-using-with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good--Just curious why are we not using with open(...) here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realise you could do nested withs! Fixing now.

Copy link
Contributor

@KeithTheEE KeithTheEE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and now it avoids disabling the consider-using-with lint flag which is good.

@KeithTheEE KeithTheEE merged commit 39f0c36 into adafruit:main Nov 5, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 12, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 5.0.2 from 5.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#112 from kattni/requirements
  > Updated readthedocs file
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#111 from kattni/linting
  > Disabled unspecified-encoding pylint check
  > PATCH Pylint and readthedocs patch test
  > add docs link to readme
  > Globally disabled consider-using-f-string pylint check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants