File tree 3 files changed +7
-7
lines changed
models-library/src/models_library
settings-library/src/settings_library
services/director-v2/tests/unit
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import re
2
- from enum import Enum
2
+ from enum import StrEnum
3
3
from typing import TypeAlias
4
4
5
5
from pydantic import (
@@ -116,14 +116,14 @@ class HttpUrlWithCustomMinLength(HttpUrl):
116
116
min_length = 0
117
117
118
118
119
- class LogLevel (str , Enum ):
119
+ class LogLevel (StrEnum ):
120
120
DEBUG = "DEBUG"
121
121
INFO = "INFO"
122
122
WARNING = "WARNING"
123
123
ERROR = "ERROR"
124
124
125
125
126
- class BootModeEnum (str , Enum ):
126
+ class BootModeEnum (StrEnum ):
127
127
"""
128
128
Values taken by SC_BOOT_MODE environment variable
129
129
set in Dockerfile and used during docker/boot.sh
@@ -140,7 +140,7 @@ def is_devel_mode(self) -> bool:
140
140
return self in (self .DEBUG , self .DEVELOPMENT , self .LOCAL )
141
141
142
142
143
- class BuildTargetEnum (str , Enum ):
143
+ class BuildTargetEnum (StrEnum ):
144
144
"""
145
145
Values taken by SC_BUILD_TARGET environment variable
146
146
set in Dockerfile that defines the stage targeted in the
Original file line number Diff line number Diff line change 1
- from enum import Enum
1
+ from enum import StrEnum
2
2
3
3
from pydantic import Field , NonNegativeInt
4
4
5
5
from .base import BaseCustomSettings
6
6
from .s3 import S3Settings
7
7
8
8
9
- class S3Provider (str , Enum ):
9
+ class S3Provider (StrEnum ):
10
10
AWS = "AWS"
11
11
CEPH = "CEPH"
12
12
MINIO = "MINIO"
Original file line number Diff line number Diff line change 21
21
22
22
23
23
def _get_backend_type_options () -> set [str ]:
24
- return {x . value for x in S3Provider if not x .startswith ("_" )}
24
+ return {x for x in S3Provider if not x .startswith ("_" )}
25
25
26
26
27
27
def test_supported_backends_did_not_change () -> None :
You can’t perform that action at this time.
0 commit comments