adding docs

This commit is contained in:
2020-03-07 22:36:33 +00:00
parent 3ec71d7076
commit d3fc96cfdd
5 changed files with 309 additions and 19 deletions

View File

@@ -378,7 +378,6 @@ class LyricsBuilder(LyricsConcreteBuilder):
Returns
-------
None
Description
"""
self.all_albums_lyrics_sum = list()
album_lyrics = self.all_albums_lyrics_count
@@ -390,7 +389,6 @@ class LyricsBuilder(LyricsConcreteBuilder):
for album, lyrics_list in i.items():
album_avg = list()
d = addict.Dict()
# print(album)
for j in lyrics_list:
if j != 'No Lyrics':
song_total = 0
@@ -407,10 +405,7 @@ class LyricsBuilder(LyricsConcreteBuilder):
d = addict.Dict((album, album_avg))
# print(d)
self.all_albums_lyrics_sum.append(d)
# print(count)
# with open(f'{os.getcwd()}/lyrics_sum_all_album.json', 'w+') as f:
# json.dump(self.all_albums_lyrics_sum, f)
# return self
return self
def calculate_final_average_by_album(self) -> None:
"""Calculates descriptive statistics by album.

View File

@@ -30,17 +30,9 @@ class ComplexCLI(click.MultiCommand):
rv.sort()
return rv
# def get_command(self, ctx, name):
# try:
# mod = import_module(f'musicbrainzapi.cli.commands.cmd_{name}')
# except ImportError as e:
# print(e)
# return
# return mod.cli
def get_command(self, ctx, name):
mod = import_module(f'musicbrainzapi.cli.commands.cmd_{name}')
return mod.cli
return getattr(mod, name)
@click.command(cls=ComplexCLI, context_settings=CONTEXT_SETTINGS)

View File

@@ -54,7 +54,7 @@ from musicbrainzapi.api.lyrics.director import LyricsClickDirector
)
@click.command()
@pass_environment
def cli(
def lyrics(
ctx,
artist: str,
country: Union[str, None],