fixed somethin
This commit is contained in:
parent
e445e7b5d1
commit
a7de1d2a68
@ -5,14 +5,10 @@ from music_kraken.pages import (
|
|||||||
EncyclopaediaMetallum
|
EncyclopaediaMetallum
|
||||||
)
|
)
|
||||||
|
|
||||||
"""
|
|
||||||
results = EncyclopaediaMetallum.search_by_query("#a Only Smile")
|
results = EncyclopaediaMetallum.search_by_query("#a Happy Days")
|
||||||
|
|
||||||
artist = results[0]
|
artist = results[0]
|
||||||
artist: objects.Artist = EncyclopaediaMetallum.fetch_details(artist)
|
artist: objects.Artist = EncyclopaediaMetallum.fetch_details(artist)
|
||||||
print(artist.options)
|
print(artist.options)
|
||||||
print()
|
print()
|
||||||
"""
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
pass
|
|
||||||
|
@ -21,8 +21,10 @@ class Options:
|
|||||||
|
|
||||||
return self._data[index].options
|
return self._data[index].options
|
||||||
|
|
||||||
def __getitem__(self, item: int) -> 'Options':
|
def __getitem__(self, item: int) -> 'DatabaseObject':
|
||||||
if type(item) != int:
|
if type(item) != int:
|
||||||
raise TypeError("Key needs to be an Integer")
|
raise TypeError("Key needs to be an Integer")
|
||||||
|
if item >= len(self._data):
|
||||||
|
raise ValueError("Index out of bounds")
|
||||||
|
|
||||||
return self.get_next_options(item)
|
return self._data[item]
|
||||||
|
Loading…
Reference in New Issue
Block a user