ruff: ruff specific rules

This commit is contained in:
sigma67 2024-01-18 21:53:23 +01:00
commit 9170197457
No known key found for this signature in database
GPG key ID: 1C314227DF0103D0
18 changed files with 62 additions and 61 deletions

View file

@ -11,7 +11,7 @@ class TestBrowser:
headers_raw = config["auth"]["headers_raw"].split("\n")
with (
mock.patch("sys.argv", ["ytmusicapi", "browser", "--file", browser_filepath]),
mock.patch("builtins.input", side_effect=(headers_raw + [EOFError()])),
mock.patch("builtins.input", side_effect=([*headers_raw, EOFError()])),
):
headers = main()
assert len(headers) >= 2

View file

@ -2,7 +2,7 @@ class TestExplore:
def test_get_mood_playlists(self, yt):
categories = yt.get_mood_categories()
assert len(list(categories)) > 0
cat = list(categories)[0]
cat = next(iter(categories))
assert len(categories[cat]) > 0
playlists = yt.get_mood_playlists(categories[cat][0]["params"])
assert len(playlists) > 0