mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-28 02:11:31 +00:00
chore: sort imports in assets package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
# Business logic that orchestrates database queries and filesystem operations
|
||||
# Services own session lifecycle via create_session()
|
||||
|
||||
from app.assets.services.asset_management import (
|
||||
delete_asset_reference,
|
||||
get_asset_detail,
|
||||
set_asset_preview,
|
||||
update_asset_metadata,
|
||||
)
|
||||
from app.assets.services.ingest import (
|
||||
ingest_file_from_path,
|
||||
register_existing_asset,
|
||||
)
|
||||
from app.assets.services.asset_management import (
|
||||
get_asset_detail,
|
||||
update_asset_metadata,
|
||||
delete_asset_reference,
|
||||
set_asset_preview,
|
||||
)
|
||||
from app.assets.services.tagging import (
|
||||
apply_tags,
|
||||
remove_tags,
|
||||
list_tags,
|
||||
remove_tags,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -12,14 +12,6 @@ import os
|
||||
from typing import Sequence
|
||||
|
||||
from app.assets.database.models import Asset
|
||||
from app.database.db import create_session
|
||||
from app.assets.helpers import select_best_live_path
|
||||
from app.assets.services.path_utils import compute_relative_filename
|
||||
from app.assets.services.schemas import (
|
||||
AssetDetailResult,
|
||||
extract_asset_data,
|
||||
extract_info_data,
|
||||
)
|
||||
from app.assets.database.queries import (
|
||||
asset_info_exists_for_asset_id,
|
||||
delete_asset_info_by_id,
|
||||
@@ -32,6 +24,14 @@ from app.assets.database.queries import (
|
||||
update_asset_info_name,
|
||||
update_asset_info_updated_at,
|
||||
)
|
||||
from app.assets.helpers import select_best_live_path
|
||||
from app.assets.services.path_utils import compute_relative_filename
|
||||
from app.assets.services.schemas import (
|
||||
AssetDetailResult,
|
||||
extract_asset_data,
|
||||
extract_info_data,
|
||||
)
|
||||
from app.database.db import create_session
|
||||
|
||||
|
||||
def get_asset_detail(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import IO
|
||||
import os
|
||||
import asyncio
|
||||
import os
|
||||
from typing import IO
|
||||
|
||||
try:
|
||||
from blake3 import blake3
|
||||
|
||||
@@ -12,16 +12,10 @@ from typing import Sequence
|
||||
from sqlalchemy import select
|
||||
|
||||
from app.assets.database.models import Asset, Tag
|
||||
from app.database.db import create_session
|
||||
from app.assets.helpers import normalize_tags, select_best_live_path
|
||||
from app.assets.services.path_utils import compute_relative_filename
|
||||
from app.assets.services.schemas import (
|
||||
RegisterAssetResult,
|
||||
extract_asset_data,
|
||||
extract_info_data,
|
||||
)
|
||||
from app.assets.database.queries import (
|
||||
add_tags_to_asset_info,
|
||||
get_asset_by_hash,
|
||||
get_asset_tags,
|
||||
get_or_create_asset_info,
|
||||
list_cache_states_by_asset_id,
|
||||
remove_missing_tag_for_asset_id,
|
||||
@@ -30,9 +24,15 @@ from app.assets.database.queries import (
|
||||
update_asset_info_timestamps,
|
||||
upsert_asset,
|
||||
upsert_cache_state,
|
||||
add_tags_to_asset_info,
|
||||
get_asset_tags,
|
||||
)
|
||||
from app.assets.helpers import normalize_tags, select_best_live_path
|
||||
from app.assets.services.path_utils import compute_relative_filename
|
||||
from app.assets.services.schemas import (
|
||||
RegisterAssetResult,
|
||||
extract_asset_data,
|
||||
extract_info_data,
|
||||
)
|
||||
from app.database.db import create_session
|
||||
|
||||
|
||||
def ingest_file_from_path(
|
||||
|
||||
@@ -3,7 +3,6 @@ from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
import folder_paths
|
||||
|
||||
from app.assets.helpers import normalize_tags
|
||||
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ Business logic for:
|
||||
- remove_tags: Remove tags from an asset
|
||||
- list_tags: List tags with usage counts
|
||||
"""
|
||||
from app.database.db import create_session
|
||||
from app.assets.database.queries import (
|
||||
add_tags_to_asset_info,
|
||||
get_asset_info_by_id,
|
||||
list_tags_with_usage,
|
||||
remove_tags_from_asset_info,
|
||||
)
|
||||
from app.database.db import create_session
|
||||
|
||||
|
||||
def apply_tags(
|
||||
|
||||
Reference in New Issue
Block a user