From ddb662632922aa31fdf0b9e10ab4fca67e0880e9 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Tue, 19 Nov 2024 19:47:43 -0500 Subject: [PATCH] Shim StrEnum --- comfy/comfy_types/node_typing.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/comfy/comfy_types/node_typing.py b/comfy/comfy_types/node_typing.py index 3815b30ed..e8b4374c9 100644 --- a/comfy/comfy_types/node_typing.py +++ b/comfy/comfy_types/node_typing.py @@ -2,7 +2,14 @@ from typing import Literal, TypedDict from abc import ABC, abstractmethod -from enum import StrEnum +from enum import Enum + + +class StrEnum(str, Enum): + """Base class for string enums. Python's StrEnum is not available until 3.11.""" + + def __str__(self) -> str: + return self.value class IO(StrEnum):