mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-29 19:01:27 +00:00
refactor: add explicit types to asset service functions
- Add typed result dataclasses: IngestResult, AddTagsResult, RemoveTagsResult, SetTagsResult, TagUsage - Add UserMetadata type alias for user_metadata parameters - Type helper functions with Session parameters - Use TypedDicts at query layer to avoid circular imports - Update manager.py and tests to use attribute access Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,18 @@ from app.assets.services.ingest import (
|
||||
ingest_file_from_path,
|
||||
register_existing_asset,
|
||||
)
|
||||
from app.assets.services.schemas import (
|
||||
AddTagsResult,
|
||||
AssetData,
|
||||
AssetDetailResult,
|
||||
AssetInfoData,
|
||||
IngestResult,
|
||||
RegisterAssetResult,
|
||||
RemoveTagsResult,
|
||||
SetTagsResult,
|
||||
TagUsage,
|
||||
UserMetadata,
|
||||
)
|
||||
from app.assets.services.tagging import (
|
||||
apply_tags,
|
||||
list_tags,
|
||||
@@ -24,4 +36,14 @@ __all__ = [
|
||||
"apply_tags",
|
||||
"remove_tags",
|
||||
"list_tags",
|
||||
"AddTagsResult",
|
||||
"AssetData",
|
||||
"AssetDetailResult",
|
||||
"AssetInfoData",
|
||||
"IngestResult",
|
||||
"RegisterAssetResult",
|
||||
"RemoveTagsResult",
|
||||
"SetTagsResult",
|
||||
"TagUsage",
|
||||
"UserMetadata",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user