Skip to content

Commit 31e97f0

Browse files
Copilotpamelafox
andauthored
Fix ruff UP042: use StrEnum instead of (str, Enum) in structured_outputs_enum.py
Agent-Logs-Url: https://github.com/Azure-Samples/python-openai-demos/sessions/ebccd6b3-636f-4c5a-8a77-fb899eccb0b1 Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
1 parent 3cdbfa7 commit 31e97f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spanish/structured_outputs_enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from enum import Enum
2+
from enum import StrEnum
33

44
import azure.identity
55
import openai
@@ -34,7 +34,7 @@
3434
MODEL_NAME = os.environ["OPENAI_MODEL"]
3535

3636

37-
class DayOfWeek(str, Enum):
37+
class DayOfWeek(StrEnum):
3838
DOMINGO = "Domingo"
3939
LUNES = "Lunes"
4040
MARTES = "Martes"

structured_outputs_enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from enum import Enum
2+
from enum import StrEnum
33

44
import azure.identity
55
import openai
@@ -34,7 +34,7 @@
3434
MODEL_NAME = os.environ["OPENAI_MODEL"]
3535

3636

37-
class DayOfWeek(str, Enum):
37+
class DayOfWeek(StrEnum):
3838
SUNDAY = "Sunday"
3939
MONDAY = "Monday"
4040
TUESDAY = "Tuesday"

0 commit comments

Comments
 (0)