Fix a few linter errors
This commit is contained in:
@@ -1113,8 +1113,8 @@ class SublimeMusicApp(Gtk.Application):
|
||||
) # noqa: S001
|
||||
AdapterManager.batch_download_songs(
|
||||
[self.app_config.state.play_queue[i] for i in prefetch_idxs],
|
||||
before_download=lambda: self.update_window,
|
||||
on_song_download_complete=lambda: self.update_window,
|
||||
before_download=lambda: self.update_window(),
|
||||
on_song_download_complete=lambda: self.update_window(),
|
||||
)
|
||||
|
||||
if old_play_queue:
|
||||
|
@@ -24,7 +24,6 @@ from typing import (
|
||||
List,
|
||||
Optional,
|
||||
Set,
|
||||
Tuple,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
@@ -17,7 +17,6 @@ import pychromecast
|
||||
|
||||
from sublime.adapters import AdapterManager
|
||||
from sublime.adapters.api_objects import Song
|
||||
from sublime.cache_manager import CacheManager
|
||||
from sublime.config import AppConfiguration
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Callable, cast, Iterable, Optional, Tuple, Union
|
||||
from typing import Any, Callable, Iterable, Optional, Tuple, Union
|
||||
|
||||
import gi
|
||||
|
||||
@@ -43,6 +43,7 @@ class AlbumsPanel(Gtk.Box):
|
||||
self.sort_type_combo = self.make_combobox(
|
||||
(
|
||||
("random", "randomly", True),
|
||||
# TODO this needs to be updated after the ping
|
||||
("byGenre", "by genre", AdapterManager.can_get_genres()),
|
||||
("newest", "by most recently added", True),
|
||||
("highest", "by highest rated", True),
|
||||
|
@@ -728,10 +728,14 @@ class PlaylistDetailPanel(Gtk.Overlay):
|
||||
)
|
||||
|
||||
def _format_stats(self, playlist: PlaylistDetails) -> str:
|
||||
created_date = playlist.created.strftime("%B %d, %Y")
|
||||
created_date_text = ""
|
||||
if playlist.created:
|
||||
created_date_text = " on {playlist.created.strftime('%B %d, %Y')}"
|
||||
created_text = f"Created by {playlist.owner}{created_date_text}"
|
||||
|
||||
lines = [
|
||||
util.dot_join(
|
||||
f"Created by {playlist.owner} on {created_date}",
|
||||
created_text,
|
||||
f"{'Not v' if not playlist.public else 'V'}isible to others",
|
||||
),
|
||||
util.dot_join(
|
||||
|
@@ -9,7 +9,6 @@ import pytest
|
||||
from sublime import util
|
||||
from sublime.adapters import CacheMissError
|
||||
from sublime.adapters.filesystem import FilesystemAdapter
|
||||
from sublime.adapters.filesystem import models
|
||||
from sublime.adapters.subsonic import api_objects as SubsonicAPI
|
||||
|
||||
MOCK_DATA_FILES = Path(__file__).parent.joinpath("mock_data")
|
||||
|
Reference in New Issue
Block a user