options work
This commit is contained in:
parent
bc7279d85c
commit
18a5cc1a15
@ -65,13 +65,6 @@ print_artist(artist)
|
|||||||
results = EncyclopaediaMetallum.search_by_query("#a Thy art is Murder")
|
results = EncyclopaediaMetallum.search_by_query("#a Thy art is Murder")
|
||||||
|
|
||||||
artist = results[0]
|
artist = results[0]
|
||||||
print(artist)
|
|
||||||
|
|
||||||
artist: objects.Artist = EncyclopaediaMetallum.fetch_details(artist)
|
artist: objects.Artist = EncyclopaediaMetallum.fetch_details(artist)
|
||||||
print(artist.option_string)
|
print(artist.options)
|
||||||
|
print()
|
||||||
for release in artist.main_album_collection:
|
|
||||||
print(release.option_string)
|
|
||||||
|
|
||||||
print(release.song_collection)
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
class Options:
|
class Options:
|
||||||
def __init__(self, option_list: List[DatabaseObject] = None):
|
def __init__(self, option_list: List['DatabaseObject'] = None):
|
||||||
self._data: List[DatabaseObject] = option_list or list()
|
self._data: List['DatabaseObject'] = option_list or list()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "\n".join(f"{i:02d}: {database_object.option_string}" for i, database_object in enumerate(self._data))
|
return "\n".join(f"{i:02d}: {database_object.option_string}" for i, database_object in enumerate(self._data))
|
||||||
|
Loading…
Reference in New Issue
Block a user