mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 04:40:15 +08:00
Remove remaining classproperty decorators in comfy.api.schemas
This commit is contained in:
parent
122fe824ec
commit
3d1d67a2d7
@ -13,19 +13,22 @@ from comfy.api.shared_imports.schema_imports import * # pyright: ignore [report
|
|||||||
|
|
||||||
|
|
||||||
class SchemaEnums:
|
class SchemaEnums:
|
||||||
|
@classmethod
|
||||||
@schemas.classproperty
|
def output(cls) -> typing.Literal["output"]:
|
||||||
def OUTPUT(cls) -> typing.Literal["output"]:
|
|
||||||
return Schema.validate("output")
|
return Schema.validate("output")
|
||||||
|
|
||||||
@schemas.classproperty
|
@classmethod
|
||||||
def INPUT(cls) -> typing.Literal["input"]:
|
def input(cls) -> typing.Literal["input"]:
|
||||||
return Schema.validate("input")
|
return Schema.validate("input")
|
||||||
|
|
||||||
@schemas.classproperty
|
@classmethod
|
||||||
def TEMP(cls) -> typing.Literal["temp"]:
|
def temp(cls) -> typing.Literal["temp"]:
|
||||||
return Schema.validate("temp")
|
return Schema.validate("temp")
|
||||||
|
|
||||||
|
OUTPUT = property(output)
|
||||||
|
INPUT = property(input)
|
||||||
|
TEMP = property(temp)
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
class Schema(
|
class Schema(
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import typing_extensions
|
|||||||
from .schema import (
|
from .schema import (
|
||||||
get_class,
|
get_class,
|
||||||
none_type_,
|
none_type_,
|
||||||
classproperty,
|
|
||||||
Bool,
|
Bool,
|
||||||
FileIO,
|
FileIO,
|
||||||
Schema,
|
Schema,
|
||||||
@ -104,7 +103,6 @@ def raise_if_key_known(
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
'get_class',
|
'get_class',
|
||||||
'none_type_',
|
'none_type_',
|
||||||
'classproperty',
|
|
||||||
'Bool',
|
'Bool',
|
||||||
'FileIO',
|
'FileIO',
|
||||||
'Schema',
|
'Schema',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user