Format code with yapf
This commit fixes the style issues introduced in 3df41f0 according to the output
from yapf.
Details: https://deepsource.io/gh/kokarare1212/librespot-python/transform/8943cbb4-879c-4a5f-8f77-e14c8c5ac178/
This commit is contained in:
committed by
GitHub
parent
3df41f04fc
commit
45e69da1a8
@@ -25,8 +25,7 @@ class AlbumId(SpotifyId.SpotifyId):
|
||||
|
||||
@staticmethod
|
||||
def from_base62(base62: str) -> AlbumId:
|
||||
return AlbumId(
|
||||
Utils.bytes_to_hex(AlbumId._BASE62.decode(base62, 16)))
|
||||
return AlbumId(Utils.bytes_to_hex(AlbumId._BASE62.decode(base62, 16)))
|
||||
|
||||
@staticmethod
|
||||
def from_hex(hex_str: str) -> AlbumId:
|
||||
|
||||
@@ -18,15 +18,14 @@ class ArtistId(SpotifyId.SpotifyId):
|
||||
if matcher is not None:
|
||||
artist_id = matcher.group(1)
|
||||
return ArtistId(
|
||||
Utils.bytes_to_hex(ArtistId._BASE62.decode(
|
||||
artist_id, 16)))
|
||||
Utils.bytes_to_hex(ArtistId._BASE62.decode(artist_id, 16)))
|
||||
else:
|
||||
raise TypeError("Not a Spotify artist ID: {}".format(uri))
|
||||
|
||||
@staticmethod
|
||||
def from_base62(base62: str) -> ArtistId:
|
||||
return ArtistId(
|
||||
Utils.bytes_to_hex(ArtistId._BASE62.decode(base62, 16)))
|
||||
return ArtistId(Utils.bytes_to_hex(ArtistId._BASE62.decode(base62,
|
||||
16)))
|
||||
|
||||
@staticmethod
|
||||
def from_hex(hex_str: str) -> ArtistId:
|
||||
|
||||
@@ -24,8 +24,7 @@ class ShowId(SpotifyId.SpotifyId):
|
||||
|
||||
@staticmethod
|
||||
def from_base62(base62: str) -> ShowId:
|
||||
return ShowId(
|
||||
Utils.bytes_to_hex(ShowId._BASE62.decode(base62, 16)))
|
||||
return ShowId(Utils.bytes_to_hex(ShowId._BASE62.decode(base62, 16)))
|
||||
|
||||
@staticmethod
|
||||
def from_hex(hex_str: str) -> ShowId:
|
||||
|
||||
@@ -18,15 +18,14 @@ class TrackId(PlayableId, SpotifyId):
|
||||
if search is not None:
|
||||
track_id = search.group(1)
|
||||
return TrackId(
|
||||
Utils.bytes_to_hex(PlayableId.BASE62.decode(
|
||||
track_id, 16)))
|
||||
Utils.bytes_to_hex(PlayableId.BASE62.decode(track_id, 16)))
|
||||
else:
|
||||
raise RuntimeError("Not a Spotify track ID: {}".format(uri))
|
||||
|
||||
@staticmethod
|
||||
def from_base62(base62: str) -> TrackId:
|
||||
return TrackId(
|
||||
Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16)))
|
||||
return TrackId(Utils.bytes_to_hex(PlayableId.BASE62.decode(base62,
|
||||
16)))
|
||||
|
||||
@staticmethod
|
||||
def from_hex(hex_str: str) -> TrackId:
|
||||
|
||||
Reference in New Issue
Block a user