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 (
AGENT,
AVAILABLE_QUALITY_IDS,
DEEZER_BASE,
DEEZER_MAX_Q,
QOBUZ_BASE,
QOBUZ_FEATURED_KEYS,
SOUNDCLOUD_BASE,
SOUNDCLOUD_CLIENT_ID,
TIDAL_AUTH_URL,
TIDAL_BASE,
TIDAL_CLIENT_INFO,
TIDAL_MAX_Q,
QOBUZ_BASE,
TIDAL_BASE,
TIDAL_AUTH_URL,
DEEZER_BASE,
SOUNDCLOUD_BASE,
)
from .exceptions import (
AuthenticationError,

View file

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

View file

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

View file

@ -138,7 +138,9 @@ class MusicDL(list):
try:
arguments = self._get_download_args()
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()
exit()
except Exception as err: