I have the following code for a function definition that I wrote, there's nothing wrong with it functionality wise however I'm starting to see the potential flaws in readability, especially with the return values. I was wondering if there was anything that anyone can suggest would be a better way of type hinting a function like this?
Here's the code:
def get_artist_discography(
self, artist_name: str
) -> list[dict[str : Union[str, List[dict[str:str]]]]]: