From b2c891d68a1504acc2d84dcb1ad9cdb636cc680a Mon Sep 17 00:00:00 2001 From: Robusta Runner Date: Thu, 30 May 2024 18:36:18 +0300 Subject: [PATCH] python3.10 compat --- holmes/config.py | 4 ++-- holmes/core/issue.py | 4 ++-- holmes/plugins/destinations/__init__.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/holmes/config.py b/holmes/config.py index 12f9e257..3cc0616a 100644 --- a/holmes/config.py +++ b/holmes/config.py @@ -1,6 +1,6 @@ import logging import os.path -from enum import StrEnum +from enum import Enum from typing import (Annotated, Any, ClassVar, List, Literal, Optional, Pattern, TypeVar, Union) @@ -21,7 +21,7 @@ from holmes.utils.pydantic_utils import RobustaBaseConfig, load_model_from_file -class LLMType(StrEnum): +class LLMType(str, Enum): OPENAI = "openai" AZURE = "azure" diff --git a/holmes/core/issue.py b/holmes/core/issue.py index 3aaff2f2..6c4b53df 100644 --- a/holmes/core/issue.py +++ b/holmes/core/issue.py @@ -1,11 +1,11 @@ from datetime import datetime -from enum import StrEnum +from enum import Enum from typing import Optional from pydantic import BaseModel, ConfigDict -class IssueStatus (StrEnum): +class IssueStatus (str, Enum): OPEN = "open" CLOSED = "closed" diff --git a/holmes/plugins/destinations/__init__.py b/holmes/plugins/destinations/__init__.py index b975443e..df7510c8 100644 --- a/holmes/plugins/destinations/__init__.py +++ b/holmes/plugins/destinations/__init__.py @@ -1,5 +1,5 @@ -from enum import StrEnum +from enum import Enum -class DestinationType(StrEnum): +class DestinationType(str, Enum): SLACK = "slack" CLI = "cli"