diff --git a/conftest.py b/conftest.py index f448d00..4ad5a32 100644 --- a/conftest.py +++ b/conftest.py @@ -9,6 +9,7 @@ import pytest from click.testing import CliRunner + from rose.cache import CACHE_SCHEMA_PATH, process_string_for_fts, update_cache from rose.common import VERSION from rose.config import Config, VirtualFSConfig diff --git a/rose-cli/rose_cli/__main__.py b/rose-cli/rose_cli/__main__.py index 293759c..1e4ee60 100644 --- a/rose-cli/rose_cli/__main__.py +++ b/rose-cli/rose_cli/__main__.py @@ -1,8 +1,8 @@ import sys import click -from rose import RoseExpectedError +from rose import RoseExpectedError from rose_cli.cli import CliExpectedError, cli diff --git a/rose-cli/rose_cli/cli.py b/rose-cli/rose_cli/cli.py index 6d8b56b..dc16ea2 100644 --- a/rose-cli/rose_cli/cli.py +++ b/rose-cli/rose_cli/cli.py @@ -15,6 +15,7 @@ from pathlib import Path import click + from rose import ( VERSION, Action, @@ -50,7 +51,6 @@ toggle_release_new, update_cache, ) - from rose_cli.dump import ( dump_all_artists, dump_all_collages, diff --git a/rose-cli/rose_cli/cli_test.py b/rose-cli/rose_cli/cli_test.py index e36367d..b39e9c8 100644 --- a/rose-cli/rose_cli/cli_test.py +++ b/rose-cli/rose_cli/cli_test.py @@ -5,9 +5,9 @@ import pytest from click.testing import CliRunner -from rose import AudioTags, Config from rose_vfs.virtualfs_test import start_virtual_fs +from rose import AudioTags, Config from rose_cli.cli import ( Context, InvalidReleaseArgError, diff --git a/rose-cli/rose_cli/dump_test.py b/rose-cli/rose_cli/dump_test.py index 125f20c..302fbc6 100644 --- a/rose-cli/rose_cli/dump_test.py +++ b/rose-cli/rose_cli/dump_test.py @@ -2,8 +2,8 @@ from typing import Any import pytest -from rose import Config, Matcher +from rose import Config, Matcher from rose_cli.dump import ( dump_all_artists, dump_all_collages, diff --git a/rose-cli/rose_cli/templates.py b/rose-cli/rose_cli/templates.py index d7419de..31f7d74 100644 --- a/rose-cli/rose_cli/templates.py +++ b/rose-cli/rose_cli/templates.py @@ -1,4 +1,5 @@ import click + from rose import ( Config, PathTemplate, diff --git a/rose-cli/rose_cli/templates_test.py b/rose-cli/rose_cli/templates_test.py index 6fc9c1b..2dea070 100644 --- a/rose-cli/rose_cli/templates_test.py +++ b/rose-cli/rose_cli/templates_test.py @@ -1,7 +1,7 @@ import click from click.testing import CliRunner -from rose import Config +from rose import Config from rose_cli.templates import ( preview_path_templates, ) diff --git a/rose-vfs/rose_vfs/__init__.py b/rose-vfs/rose_vfs/__init__.py index 30b1a01..e342445 100644 --- a/rose-vfs/rose_vfs/__init__.py +++ b/rose-vfs/rose_vfs/__init__.py @@ -1,5 +1,4 @@ from rose import initialize_logging - from rose_vfs.virtualfs import mount_virtualfs, unmount_virtualfs __all__ = [ diff --git a/rose-vfs/rose_vfs/virtualfs_test.py b/rose-vfs/rose_vfs/virtualfs_test.py index 74499ed..18730e7 100644 --- a/rose-vfs/rose_vfs/virtualfs_test.py +++ b/rose-vfs/rose_vfs/virtualfs_test.py @@ -8,9 +8,9 @@ from pathlib import Path import pytest -from rose import AudioTags, Config from conftest import retry_for_sec +from rose import AudioTags, Config from rose_vfs.virtualfs import ALL_TRACKS, mount_virtualfs, unmount_virtualfs R1_VNAME = "Techno Man & Bass Man - 2023. Release 1" diff --git a/rose-watch/rose_watch/__init__.py b/rose-watch/rose_watch/__init__.py index b9f1e83..e3d09ce 100644 --- a/rose-watch/rose_watch/__init__.py +++ b/rose-watch/rose_watch/__init__.py @@ -1,5 +1,4 @@ from rose import initialize_logging - from rose_watch.watcher import start_watchdog __all__ = [ diff --git a/rose-watch/rose_watch/watcher.py b/rose-watch/rose_watch/watcher.py index 8cdd6d9..5317a11 100644 --- a/rose-watch/rose_watch/watcher.py +++ b/rose-watch/rose_watch/watcher.py @@ -29,6 +29,13 @@ from queue import Empty, Queue from typing import Literal +from watchdog.events import ( + FileSystemEvent, + FileSystemEventHandler, + FileSystemMovedEvent, +) +from watchdog.observers import Observer + from rose import ( Config, update_cache_evict_nonexistent_collages, @@ -38,12 +45,6 @@ update_cache_for_playlists, update_cache_for_releases, ) -from watchdog.events import ( - FileSystemEvent, - FileSystemEventHandler, - FileSystemMovedEvent, -) -from watchdog.observers import Observer logger = logging.getLogger(__name__) diff --git a/rose-watch/rose_watch/watcher_test.py b/rose-watch/rose_watch/watcher_test.py index 6ea4944..f2a5eab 100644 --- a/rose-watch/rose_watch/watcher_test.py +++ b/rose-watch/rose_watch/watcher_test.py @@ -4,10 +4,9 @@ from contextlib import contextmanager from multiprocessing import Process +from conftest import TEST_COLLAGE_1, TEST_PLAYLIST_1, TEST_RELEASE_2, TEST_RELEASE_3, retry_for_sec from rose import Config from rose.cache import connect - -from conftest import TEST_COLLAGE_1, TEST_PLAYLIST_1, TEST_RELEASE_2, TEST_RELEASE_3, retry_for_sec from rose_watch.watcher import start_watchdog