mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-20 03:23:00 +08:00
fix ruff
This commit is contained in:
parent
b874f469ce
commit
380b6aec8e
@ -133,22 +133,16 @@ def get_outputs_summary(outputs):
|
||||
for item in items:
|
||||
count += 1
|
||||
|
||||
if preview_output is not None:
|
||||
continue
|
||||
|
||||
if not is_previewable(media_type, item):
|
||||
continue
|
||||
|
||||
enriched = {
|
||||
**item,
|
||||
'nodeId': node_id,
|
||||
'mediaType': media_type
|
||||
}
|
||||
|
||||
if item.get('type') == 'output':
|
||||
preview_output = enriched
|
||||
elif fallback_preview is None:
|
||||
fallback_preview = enriched
|
||||
if preview_output is None and is_previewable(media_type, item):
|
||||
enriched = {
|
||||
**item,
|
||||
'nodeId': node_id,
|
||||
'mediaType': media_type
|
||||
}
|
||||
if item.get('type') == 'output':
|
||||
preview_output = enriched
|
||||
elif fallback_preview is None:
|
||||
fallback_preview = enriched
|
||||
|
||||
return count, preview_output or fallback_preview
|
||||
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
"""Unit tests for comfy_execution/jobs.py"""
|
||||
import pytest
|
||||
from pytest import fixture
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from comfy_execution.jobs import (
|
||||
JobStatus,
|
||||
PREVIEWABLE_MEDIA_TYPES,
|
||||
THREE_D_EXTENSIONS,
|
||||
is_previewable,
|
||||
normalize_queue_item,
|
||||
normalize_history_item,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user