diff --git a/src/apscheduler/_converters.py b/src/apscheduler/_converters.py index 6f087abe..97736db4 100644 --- a/src/apscheduler/_converters.py +++ b/src/apscheduler/_converters.py @@ -2,7 +2,7 @@ from collections.abc import Callable from datetime import date, datetime, timedelta, timezone, tzinfo -from enum import EnumType +from enum import EnumMeta from typing import TypeVar from uuid import UUID from zoneinfo import ZoneInfo @@ -64,8 +64,8 @@ def as_timedelta(value: timedelta | int) -> timedelta: return value -def as_enum(enum_class: EnumType) -> Callable[[EnumType | str], EnumType]: - def converter(value: EnumType | str) -> EnumType: +def as_enum(enum_class: EnumMeta) -> Callable[[EnumMeta | str], EnumMeta]: + def converter(value: EnumMeta | str) -> EnumMeta: if isinstance(value, str): return enum_class.__members__[value]