From 4e8792e1be160b4581c781f6486207522d2d259c Mon Sep 17 00:00:00 2001 From: blissful Date: Sat, 21 Sep 2024 11:28:35 -0700 Subject: [PATCH] lint --- conftest.py | 1 - rose-cli/rose_cli/__main__.py | 2 +- rose-cli/rose_cli/cli.py | 2 +- rose-cli/rose_cli/cli_test.py | 2 +- rose-cli/rose_cli/dump_test.py | 2 +- rose-cli/rose_cli/templates.py | 1 - rose-cli/rose_cli/templates_test.py | 2 +- rose-vfs/rose_vfs/__init__.py | 1 + rose-vfs/rose_vfs/virtualfs.py | 1 - rose-vfs/rose_vfs/virtualfs_test.py | 2 +- rose-watch/rose_watch/__init__.py | 1 + rose-watch/rose_watch/watcher.py | 13 ++++++------- rose-watch/rose_watch/watcher_test.py | 3 ++- 13 files changed, 16 insertions(+), 17 deletions(-) diff --git a/conftest.py b/conftest.py index 4ad5a32..f448d00 100644 --- a/conftest.py +++ b/conftest.py @@ -9,7 +9,6 @@ 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 1e4ee60..293759c 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_cli.cli import CliExpectedError, cli diff --git a/rose-cli/rose_cli/cli.py b/rose-cli/rose_cli/cli.py index dc16ea2..6d8b56b 100644 --- a/rose-cli/rose_cli/cli.py +++ b/rose-cli/rose_cli/cli.py @@ -15,7 +15,6 @@ from pathlib import Path import click - from rose import ( VERSION, Action, @@ -51,6 +50,7 @@ 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 b39e9c8..e36367d 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 302fbc6..125f20c 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_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 31f7d74..d7419de 100644 --- a/rose-cli/rose_cli/templates.py +++ b/rose-cli/rose_cli/templates.py @@ -1,5 +1,4 @@ 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 2dea070..6fc9c1b 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_cli.templates import ( preview_path_templates, ) diff --git a/rose-vfs/rose_vfs/__init__.py b/rose-vfs/rose_vfs/__init__.py index e342445..30b1a01 100644 --- a/rose-vfs/rose_vfs/__init__.py +++ b/rose-vfs/rose_vfs/__init__.py @@ -1,4 +1,5 @@ from rose import initialize_logging + from rose_vfs.virtualfs import mount_virtualfs, unmount_virtualfs __all__ = [ diff --git a/rose-vfs/rose_vfs/virtualfs.py b/rose-vfs/rose_vfs/virtualfs.py index 9e7730c..ffaae57 100644 --- a/rose-vfs/rose_vfs/virtualfs.py +++ b/rose-vfs/rose_vfs/virtualfs.py @@ -54,7 +54,6 @@ from typing import Any, Generic, Literal, TypeVar import llfuse - from rose import ( SUPPORTED_AUDIO_EXTENSIONS, AudioTags, diff --git a/rose-vfs/rose_vfs/virtualfs_test.py b/rose-vfs/rose_vfs/virtualfs_test.py index 18730e7..74499ed 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 e3d09ce..b9f1e83 100644 --- a/rose-watch/rose_watch/__init__.py +++ b/rose-watch/rose_watch/__init__.py @@ -1,4 +1,5 @@ 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 5317a11..8cdd6d9 100644 --- a/rose-watch/rose_watch/watcher.py +++ b/rose-watch/rose_watch/watcher.py @@ -29,13 +29,6 @@ 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, @@ -45,6 +38,12 @@ 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 f2a5eab..6ea4944 100644 --- a/rose-watch/rose_watch/watcher_test.py +++ b/rose-watch/rose_watch/watcher_test.py @@ -4,9 +4,10 @@ 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