Formatting

This commit is contained in:
nathom 2021-04-16 14:58:49 -07:00
parent 0e60e76762
commit 633810aab9
4 changed files with 11 additions and 10 deletions

View file

@ -12,16 +12,16 @@ import click
from .constants import ( from .constants import (
AGENT, AGENT,
AVAILABLE_QUALITY_IDS, AVAILABLE_QUALITY_IDS,
DEEZER_BASE,
DEEZER_MAX_Q, DEEZER_MAX_Q,
QOBUZ_BASE,
QOBUZ_FEATURED_KEYS, QOBUZ_FEATURED_KEYS,
SOUNDCLOUD_BASE,
SOUNDCLOUD_CLIENT_ID, SOUNDCLOUD_CLIENT_ID,
TIDAL_AUTH_URL,
TIDAL_BASE,
TIDAL_CLIENT_INFO, TIDAL_CLIENT_INFO,
TIDAL_MAX_Q, TIDAL_MAX_Q,
QOBUZ_BASE,
TIDAL_BASE,
TIDAL_AUTH_URL,
DEEZER_BASE,
SOUNDCLOUD_BASE,
) )
from .exceptions import ( from .exceptions import (
AuthenticationError, AuthenticationError,

View file

@ -117,8 +117,8 @@ class Config:
def update(self): def update(self):
self.reset() self.reset()
temp = copy.deepcopy(self.defaults) temp = copy.deepcopy(self.defaults)
temp['qobuz'] = self.file['qobuz'] temp["qobuz"] = self.file["qobuz"]
temp['tidal'] = self.file['tidal'] temp["tidal"] = self.file["tidal"]
self.dump(temp) self.dump(temp)
def save(self): def save(self):
@ -188,7 +188,7 @@ class Config:
return self.qobuz_creds return self.qobuz_creds
if source == "tidal": if source == "tidal":
return self.tidal_creds return self.tidal_creds
if source == "deezer" or source == 'soundcloud': if source == "deezer" or source == "soundcloud":
return dict() return dict()
raise InvalidSourceError(source) raise InvalidSourceError(source)

View file

@ -178,4 +178,3 @@ DEEZER_BASE = "https://api.deezer.com"
DEEZER_DL = "http://dz.loaderapp.info/deezer" DEEZER_DL = "http://dz.loaderapp.info/deezer"
SOUNDCLOUD_BASE = "https://api-v2.soundcloud.com" SOUNDCLOUD_BASE = "https://api-v2.soundcloud.com"

View file

@ -138,7 +138,9 @@ class MusicDL(list):
try: try:
arguments = self._get_download_args() arguments = self._get_download_args()
except KeyError: except KeyError:
click.secho("Updating config file... Please run the command again.", fg='magenta') click.secho(
"Updating config file... Please run the command again.", fg="magenta"
)
self.config.update() self.config.update()
exit() exit()
except Exception as err: except Exception as err: