Skip to content

Commit

Permalink
pylint & Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Silverarmor committed Jun 27, 2022
1 parent ffb6214 commit 1a20328
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion spotdl/console/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def entry_point():
if argument_val is not None and config_val == default_value:
settings[key] = argument_val
elif (
argument_val is None and config_val != default_value and config_val != None
argument_val is None
and config_val != default_value
and config_val is not None
):
settings[key] = config_val
else:
Expand Down
5 changes: 3 additions & 2 deletions spotdl/console/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from typing import Any, Dict, List, Optional, Tuple, Union
from pathlib import Path

import mimetypes


from fastapi import FastAPI, Response, WebSocket, WebSocketDisconnect, HTTPException
from fastapi.responses import FileResponse
from fastapi.staticfiles import StaticFiles
Expand All @@ -29,8 +32,6 @@
from spotdl.utils.search import get_search_results
from spotdl.utils.config import get_spotdl_path

import mimetypes


ALLOWED_ORIGINS = [
"http://localhost:8800",
Expand Down
10 changes: 8 additions & 2 deletions spotdl/utils/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,15 @@ def download_github_dir(

response = requests.get(api_url).json()

if type(response) is dict and "message" in response.keys() and "rate limit" in response["message"]:
if (
type(response) is dict
and "message" in response.keys()
and "rate limit" in response["message"]
):
logging.error(
"You have been rate limited by Github API attempting to update web client. Proceeding with cached web client. Please try again later. See https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting"
"""You have been rate limited by Github API attempting to update web client.
Proceeding with cached web client. Please try again later.
See https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting"""
)
return

Expand Down

0 comments on commit 1a20328

Please sign in to comment.