Fix: Replace StrEnum with strenum in code_exec.py (#9376)

### What problem does this PR solve?

- The enum import was changed from Python's built-in StrEnum to the
strenum package.
- Fix error `Warning: Failed to import module code_exec: cannot import
name 'StrEnum' from 'enum' (/usr/lib/python3.10/enum.py)`

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Liu An
2025-08-11 15:32:04 +08:00
committed by GitHub
parent a060672b31
commit b9c4954c2f

View File

@ -17,7 +17,7 @@ import base64
import logging
import os
from abc import ABC
from enum import StrEnum
from strenum import StrEnum
from typing import Optional
from pydantic import BaseModel, Field, field_validator
from agent.tools.base import ToolParamBase, ToolBase, ToolMeta