Merge pull request #45 from kokarare1212/deepsource-transform-6bc173ce

Format code with yapf
This commit is contained in:
こうから 2021-05-26 20:46:21 +09:00 committed by GitHub
commit 3a8cd7ee10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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(

View File

@ -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