options work

This commit is contained in:
Hellow 2023-03-10 21:53:25 +01:00
parent bc7279d85c
commit 18a5cc1a15
2 changed files with 4 additions and 11 deletions

View File

@ -65,13 +65,6 @@ print_artist(artist)
results = EncyclopaediaMetallum.search_by_query("#a Thy art is Murder")
artist = results[0]
print(artist)
artist: objects.Artist = EncyclopaediaMetallum.fetch_details(artist)
print(artist.option_string)
for release in artist.main_album_collection:
print(release.option_string)
print(release.song_collection)
print(artist.options)
print()

View File

@ -5,8 +5,8 @@ if TYPE_CHECKING:
class Options:
def __init__(self, option_list: List[DatabaseObject] = None):
self._data: List[DatabaseObject] = option_list or list()
def __init__(self, option_list: List['DatabaseObject'] = None):
self._data: List['DatabaseObject'] = option_list or list()
def __str__(self):
return "\n".join(f"{i:02d}: {database_object.option_string}" for i, database_object in enumerate(self._data))