Remove remaining classproperty decorators in comfy.api.schemas

This commit is contained in:
Max Tretikov 2024-06-14 12:04:35 -06:00
parent 122fe824ec
commit 3d1d67a2d7
2 changed files with 10 additions and 9 deletions

View File

@ -13,19 +13,22 @@ from comfy.api.shared_imports.schema_imports import * # pyright: ignore [report
class SchemaEnums:
@schemas.classproperty
def OUTPUT(cls) -> typing.Literal["output"]:
@classmethod
def output(cls) -> typing.Literal["output"]:
return Schema.validate("output")
@schemas.classproperty
def INPUT(cls) -> typing.Literal["input"]:
@classmethod
def input(cls) -> typing.Literal["input"]:
return Schema.validate("input")
@schemas.classproperty
def TEMP(cls) -> typing.Literal["temp"]:
@classmethod
def temp(cls) -> typing.Literal["temp"]:
return Schema.validate("temp")
OUTPUT = property(output)
INPUT = property(input)
TEMP = property(temp)
@dataclasses.dataclass(frozen=True)
class Schema(

View File

@ -14,7 +14,6 @@ import typing_extensions
from .schema import (
get_class,
none_type_,
classproperty,
Bool,
FileIO,
Schema,
@ -104,7 +103,6 @@ def raise_if_key_known(
__all__ = [
'get_class',
'none_type_',
'classproperty',
'Bool',
'FileIO',
'Schema',