From b39572b01c4f26722fbbcae0d09c492fd9b4ae7e Mon Sep 17 00:00:00 2001 From: kuba Date: Sat, 2 Sep 2023 00:23:53 +0200 Subject: [PATCH] black/isort --- spotdl/types/song.py | 5 +++-- spotdl/utils/formatter.py | 2 +- tests/test_matching.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spotdl/types/song.py b/spotdl/types/song.py index d0fdedebd..13b1aab1b 100644 --- a/spotdl/types/song.py +++ b/spotdl/types/song.py @@ -6,9 +6,10 @@ from dataclasses import asdict, dataclass from typing import Any, Dict, List, Optional, Tuple -from spotdl.utils.spotify import SpotifyClient from rapidfuzz import fuzz +from spotdl.utils.spotify import SpotifyClient + __all__ = ["Song", "SongList", "SongError"] @@ -331,7 +332,7 @@ def from_search_term(cls, search_term: str, fetch_songs: bool = True): score = fuzz.ratio(search_term.split(":", 1)[1].strip(), result["name"]) matches[result["id"]] = score - best_match = max(matches, key=matches.get) # type: ignore + best_match = max(matches, key=matches.get) # type: ignore return cls.from_url( f"http://open.spotify.com/{list_type}/{best_match}", diff --git a/spotdl/utils/formatter.py b/spotdl/utils/formatter.py index a7bd8ef2e..e5125fb49 100644 --- a/spotdl/utils/formatter.py +++ b/spotdl/utils/formatter.py @@ -510,7 +510,7 @@ def restrict_filename(pathobj: Path, strict: bool = True) -> Path: - Based on the `sanitize_filename` function from yt-dlp """ if strict: - result = sanitize_filename(pathobj.name, True, False) # type: ignore + result = sanitize_filename(pathobj.name, True, False) # type: ignore result = result.replace("_-_", "-") else: result = ( diff --git a/tests/test_matching.py b/tests/test_matching.py index f939a9006..e88c07e3e 100644 --- a/tests/test_matching.py +++ b/tests/test_matching.py @@ -248,7 +248,7 @@ "https://open.spotify.com/track/5CfVW6OUB6Uh9X6XVpdNYE", ["https://music.youtube.com/watch?v=tfTOTXOlplY"], ), - ( + # ( # # Loud Luxury - Body (Dzeko Remix) # "https://open.spotify.com/track/3ATwxbyPDsZWvlBdnyKNPQ", # [