Skip to content

Commit 19f2192

Browse files
authored
fix(V3-Schema): use empty list defaults for Schema.inputs/outputs/hidden to avoid None issues (#11083)
1 parent 519c941 commit 19f2192

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

comfy_api/latest/_io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from abc import ABC, abstractmethod
66
from collections import Counter
77
from collections.abc import Iterable
8-
from dataclasses import asdict, dataclass
8+
from dataclasses import asdict, dataclass, field
99
from enum import Enum
1010
from typing import Any, Callable, Literal, TypedDict, TypeVar, TYPE_CHECKING
1111
from typing_extensions import NotRequired, final
@@ -1199,9 +1199,9 @@ class Schema:
11991199
"""Display name of node."""
12001200
category: str = "sd"
12011201
"""The category of the node, as per the "Add Node" menu."""
1202-
inputs: list[Input]=None
1203-
outputs: list[Output]=None
1204-
hidden: list[Hidden]=None
1202+
inputs: list[Input] = field(default_factory=list)
1203+
outputs: list[Output] = field(default_factory=list)
1204+
hidden: list[Hidden] = field(default_factory=list)
12051205
description: str=""
12061206
"""Node description, shown as a tooltip when hovering over the node."""
12071207
is_input_list: bool = False

0 commit comments

Comments
 (0)