Fix package name references

This commit is contained in:
Sumner Evans
2020-09-22 11:00:09 -06:00
parent 2889c6bd7b
commit 42c807daa4
29 changed files with 77 additions and 74 deletions

View File

@@ -9,8 +9,8 @@ import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk # noqa: F401
import sublime
from sublime.app import SublimeMusicApp
import sublime_music
from .app import SublimeMusicApp
def main():
@@ -33,7 +33,7 @@ def main():
args, unknown_args = parser.parse_known_args()
if args.version:
print(f"Sublime Music v{sublime.__version__}") # noqa: T001
print(f"Sublime Music v{sublime_music.__version__}") # noqa: T001
return
min_log_level = getattr(logging, args.loglevel.upper(), None)

View File

@@ -252,7 +252,7 @@ class ConfigureServerForm(Gtk.Box):
def _set_verification_status(
self, verifying: bool, is_valid: bool = False, error_text: str = None
):
from sublime.ui import util
from sublime_music.ui import util
if verifying:
if not self.verifying_in_progress:
@@ -304,7 +304,7 @@ class ConfigureServerForm(Gtk.Box):
def _verify_config(self, ratchet: int):
self.emit("config-valid-changed", False)
from sublime.adapters import Result
from sublime_music.adapters import Result
if self.required_config_parameter_keys.issubset(set(self.config_store.keys())):
if self._verification_status_ratchet != ratchet:

View File

@@ -9,7 +9,7 @@ from typing import Any, cast, Dict, Iterable, Optional, Sequence, Set, Tuple
from gi.repository import Gtk
from peewee import fn, prefetch
from sublime.adapters import api_objects as API
from sublime_music.adapters import api_objects as API
from . import models
from .. import (

View File

@@ -14,7 +14,7 @@ from peewee import (
TextField,
)
from sublime.adapters.adapter_base import CachingAdapter
from sublime_music.adapters.adapter_base import CachingAdapter
# Custom Fields

View File

@@ -30,7 +30,7 @@ from typing import (
import requests
from sublime.config import ProviderConfiguration
from sublime_music.config import ProviderConfiguration
from .adapter_base import (
Adapter,
@@ -273,7 +273,7 @@ class AdapterManager:
config: Any,
on_song_download_progress: Callable[[Any, str, DownloadProgress], None],
):
from sublime.config import AppConfiguration
from sublime_music.config import AppConfiguration
assert isinstance(config, AppConfiguration)

View File

@@ -27,7 +27,7 @@ import requests
import semver
from gi.repository import Gtk
from sublime.util import resolve_path
from sublime_music.util import resolve_path
from .api_objects import Directory, Response
from .. import (

View File

@@ -8,8 +8,8 @@ from typing import Any, cast, Dict, Optional, Tuple, Type, Union
import dataclasses_json
from dataclasses_json import config, DataClassJsonMixin
from sublime.adapters import ConfigurationStore
from sublime.ui.state import UIState
from .adapters import ConfigurationStore
from .ui.state import UIState
# JSON decoder and encoder translations
@@ -85,7 +85,7 @@ def encode_providers(
def decode_providers(
providers_dict: Dict[str, Dict[str, Any]]
) -> Dict[str, ProviderConfiguration]:
from sublime.adapters import AdapterManager
from sublime_music.adapters import AdapterManager
def find_adapter_type(type_name: str) -> Type:
for available_adapter in AdapterManager.available_adapters:

View File

@@ -4,7 +4,7 @@ from datetime import timedelta
from enum import Enum
from typing import Callable, Dict, Optional, Set, Tuple, Type, Union
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
@dataclass

View File

@@ -12,8 +12,8 @@ from uuid import UUID
from gi.repository import GLib
from sublime.adapters import AdapterManager
from sublime.adapters.api_objects import Song
from ..adapters import AdapterManager
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent

View File

@@ -2,7 +2,7 @@ import logging
from datetime import timedelta
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
from .base import PlayerDeviceEvent, PlayerEvent
from .chromecast import ChromecastPlayer # noqa: F401
@@ -19,7 +19,8 @@ class PlayerManager:
]:
"""
:returns: Dictionary of the name of the player -> option configs (see
:class:`sublime.players.base.Player.get_configuration_options` for details).
:class:`sublime_music.players.base.Player.get_configuration_options` for
details).
"""
return {
p.name: p.get_configuration_options()

View File

@@ -4,7 +4,7 @@ from typing import Callable, cast, Dict, Optional, Tuple, Type, Union
import mpv
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent

View File

@@ -6,16 +6,16 @@ from typing import Any, Callable, cast, Iterable, List, Optional, Tuple
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
AlbumSearchQuery,
api_objects as API,
CacheMissError,
Result,
)
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
def _to_type(query_type: AlbumSearchQuery.Type) -> str:

View File

@@ -5,15 +5,15 @@ from typing import cast, List, Sequence
from gi.repository import Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
api_objects as API,
CacheMissError,
SongCacheStatus,
)
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
class ArtistsPanel(Gtk.Paned):

View File

@@ -3,10 +3,10 @@ from typing import Any, cast, List, Optional, Tuple
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API, CacheMissError, Result
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import IconButton, LoadError, SongListColumn
from ..adapters import AdapterManager, api_objects as API, CacheMissError, Result
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import IconButton, LoadError, SongListColumn
class BrowsePanel(Gtk.Overlay):

View File

@@ -3,9 +3,9 @@ from typing import Any, cast, List
from gi.repository import Gdk, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API, Result
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime_music.adapters import AdapterManager, api_objects as API, Result
from sublime_music.config import AppConfiguration
from sublime_music.ui import util
from .icon_button import IconButton
from .load_error import LoadError

View File

@@ -4,9 +4,9 @@ from typing import Any, Optional, Type
from gi.repository import Gio, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, UIInfo
from sublime.adapters.filesystem import FilesystemAdapter
from sublime.config import ConfigurationStore, ProviderConfiguration
from ..adapters import AdapterManager, UIInfo
from ..adapters.filesystem import FilesystemAdapter
from ..config import ConfigurationStore, ProviderConfiguration
class AdapterTypeModel(GObject.GObject):

View File

@@ -3,16 +3,16 @@ from typing import Any, Callable, Dict, Optional, Set, Tuple
from gi.repository import Gdk, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
api_objects as API,
DownloadProgress,
Result,
)
from sublime.config import AppConfiguration, ProviderConfiguration
from sublime.players import PlayerManager
from sublime.ui import albums, artists, browse, player_controls, playlists, util
from sublime.ui.common import IconButton, IconMenuButton, SpinnerImage
from ..config import AppConfiguration, ProviderConfiguration
from ..players import PlayerManager
from ..ui import albums, artists, browse, player_controls, playlists, util
from ..ui.common import IconButton, IconMenuButton, SpinnerImage
class MainWindow(Gtk.ApplicationWindow):

View File

@@ -6,10 +6,10 @@ from typing import Any, cast, Dict, List, Tuple
from fuzzywuzzy import fuzz
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import (
from ..adapters import AdapterManager, api_objects as API
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import (
IconButton,
LoadError,
SongListColumn,

View File

@@ -3,8 +3,8 @@ from datetime import timedelta
from enum import Enum
from typing import Any, Callable, Dict, Optional, Set, Tuple, Type
from sublime.adapters import AlbumSearchQuery
from sublime.adapters.api_objects import Genre, Song
from ..adapters import AlbumSearchQuery
from ..adapters.api_objects import Genre, Song
class RepeatType(Enum):
@@ -109,7 +109,7 @@ class UIState:
self.playing = False
def __init_available_players__(self):
from sublime.players import PlayerManager
from sublime_music.players import PlayerManager
self.available_players = {
pt: set() for pt in PlayerManager.available_player_types
@@ -125,7 +125,7 @@ class UIState:
if not self.play_queue or self.current_song_index < 0:
return None
from sublime.adapters import AdapterManager
from sublime_music.adapters import AdapterManager
current_song_id = self.play_queue[self.current_song_index]

View File

@@ -16,9 +16,9 @@ from typing import (
from deepdiff import DeepDiff
from gi.repository import Gdk, GLib, Gtk
from sublime.adapters import AdapterManager, CacheMissError, Result, SongCacheStatus
from sublime.adapters.api_objects import Playlist, Song
from sublime.config import AppConfiguration
from ..adapters import AdapterManager, CacheMissError, Result, SongCacheStatus
from ..adapters.api_objects import Playlist, Song
from ..config import AppConfiguration
def format_song_duration(duration_secs: Union[int, timedelta, None]) -> str: