From 18a5cc1a15c29be505300930c262f7a74a8b840e Mon Sep 17 00:00:00 2001 From: Hellow Date: Fri, 10 Mar 2023 21:53:25 +0100 Subject: [PATCH] options work --- src/metal_archives.py | 11 ++--------- src/music_kraken/objects/option.py | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/metal_archives.py b/src/metal_archives.py index 8fa0445..f605a7a 100644 --- a/src/metal_archives.py +++ b/src/metal_archives.py @@ -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() diff --git a/src/music_kraken/objects/option.py b/src/music_kraken/objects/option.py index ee99d3a..524596e 100644 --- a/src/music_kraken/objects/option.py +++ b/src/music_kraken/objects/option.py @@ -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))