Restyled by yapf

This commit is contained in:
Restyled.io
2021-04-09 23:16:32 +00:00
parent ee0dacc040
commit cdad65011b
8 changed files with 36 additions and 32 deletions

View File

@@ -20,7 +20,8 @@ class AlbumId(SpotifyId.SpotifyId):
matcher = AlbumId._PATTERN.search(uri)
if matcher is not None:
album_id = matcher.group(1)
return AlbumId(Utils.bytes_to_hex(AlbumId._BASE62.decode(album_id, 16)))
return AlbumId(
Utils.bytes_to_hex(AlbumId._BASE62.decode(album_id, 16)))
else:
raise TypeError("Not a Spotify album ID: {}.f".format(uri))
@@ -34,8 +35,7 @@ class AlbumId(SpotifyId.SpotifyId):
def to_mercury_uri(self) -> str:
return "spotify:album:{}".format(
AlbumId._BASE62.encode(Utils.hex_to_bytes(self._hexId))
)
AlbumId._BASE62.encode(Utils.hex_to_bytes(self._hexId)))
def hex_id(self) -> str:
return self._hexId