Skip to content

Commit

Permalink
chore: remove StrEnum
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon committed Jan 7, 2025
1 parent 653dd7d commit 35d9b98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions google/cloud/sql/connector/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@

from __future__ import annotations

from enum import StrEnum
from enum import Enum

from google.cloud.sql.connector.exceptions import IncompatibleDriverError


class RefreshStrategy(StrEnum):
# TODO: Replace Enum with StrEnum when Python 3.11 is minimum supported version
class RefreshStrategy(Enum):
LAZY = "LAZY"
BACKGROUND = "BACKGROUND"

Expand All @@ -36,7 +37,7 @@ def _from_str(cls, refresh_strategy: str) -> RefreshStrategy:
return cls(refresh_strategy.upper())


class IPTypes(StrEnum):
class IPTypes(Enum):
PUBLIC = "PRIMARY"
PRIVATE = "PRIVATE"
PSC = "PSC"
Expand All @@ -56,7 +57,7 @@ def _from_str(cls, ip_type_str: str) -> IPTypes:
return cls(ip_type_str.upper())


class DriverMapping(StrEnum):
class DriverMapping(Enum):
"""Maps a given database driver to it's corresponding database engine."""

ASYNCPG = "POSTGRES"
Expand Down

0 comments on commit 35d9b98

Please sign in to comment.