From a702e60bf1404216976be16f92da448a542bee11 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 26 May 2021 11:46:00 +0000 Subject: [PATCH] Format code with yapf This commit fixes the style issues introduced in b96b369 according to the output from yapf. Details: https://deepsource.io/gh/kokarare1212/librespot-python/transform/be8d92d8-4cc2-4865-94f6-a55f638282f5/ --- librespot/audio/AudioKeyManager.py | 3 +-- librespot/audio/cdn/CdnFeedHelper.py | 3 ++- librespot/metadata/__init__.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/librespot/audio/AudioKeyManager.py b/librespot/audio/AudioKeyManager.py index 935266d..2a92207 100644 --- a/librespot/audio/AudioKeyManager.py +++ b/librespot/audio/AudioKeyManager.py @@ -52,8 +52,7 @@ class AudioKeyManager(PacketsReceiver): return self.get_audio_key(gid, file_id, False) raise RuntimeError( "Failed fetching audio key! gid: {}, fileId: {}".format( - Utils.bytes_to_hex(gid), - Utils.bytes_to_hex(file_id))) + Utils.bytes_to_hex(gid), Utils.bytes_to_hex(file_id))) return key diff --git a/librespot/audio/cdn/CdnFeedHelper.py b/librespot/audio/cdn/CdnFeedHelper.py index 6f66a82..6b69113 100644 --- a/librespot/audio/cdn/CdnFeedHelper.py +++ b/librespot/audio/cdn/CdnFeedHelper.py @@ -94,7 +94,8 @@ class CdnFeedHelper: streamer = session.cdn().stream_file(file, key, url, halt_listener) input_stream = streamer.stream() - normalization_data = NormalizationData.NormalizationData.read(input_stream) + normalization_data = NormalizationData.NormalizationData.read( + input_stream) if input_stream.skip(0xA7) != 0xA7: raise IOError("Couldn't skip 0xa7 bytes!") return PlayableContentFeeder.PlayableContentFeeder.LoadedStream( diff --git a/librespot/metadata/__init__.py b/librespot/metadata/__init__.py index 90b6005..59f7f6a 100644 --- a/librespot/metadata/__init__.py +++ b/librespot/metadata/__init__.py @@ -166,8 +166,7 @@ class EpisodeId(SpotifyId, PlayableId): if matcher is not None: episode_id = matcher.group(1) return EpisodeId( - Utils.bytes_to_hex( - PlayableId.BASE62.decode(episode_id, 16))) + Utils.bytes_to_hex(PlayableId.BASE62.decode(episode_id, 16))) TypeError("Not a Spotify episode ID: {}".format(uri)) @staticmethod