File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
google/cloud/sql/connector Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1414
1515from __future__ import annotations
1616
17- from enum import Enum
17+ from enum import StrEnum
1818
1919from google .cloud .sql .connector .exceptions import IncompatibleDriverError
2020
2121
22- class RefreshStrategy (Enum ):
23- LAZY : str = "LAZY"
24- BACKGROUND : str = "BACKGROUND"
22+ class RefreshStrategy (StrEnum ):
23+ LAZY = "LAZY"
24+ BACKGROUND = "BACKGROUND"
2525
2626 @classmethod
2727 def _missing_ (cls , value : object ) -> None :
@@ -36,10 +36,10 @@ def _from_str(cls, refresh_strategy: str) -> RefreshStrategy:
3636 return cls (refresh_strategy .upper ())
3737
3838
39- class IPTypes (Enum ):
40- PUBLIC : str = "PRIMARY"
41- PRIVATE : str = "PRIVATE"
42- PSC : str = "PSC"
39+ class IPTypes (StrEnum ):
40+ PUBLIC = "PRIMARY"
41+ PRIVATE = "PRIVATE"
42+ PSC = "PSC"
4343
4444 @classmethod
4545 def _missing_ (cls , value : object ) -> None :
@@ -56,7 +56,7 @@ def _from_str(cls, ip_type_str: str) -> IPTypes:
5656 return cls (ip_type_str .upper ())
5757
5858
59- class DriverMapping (Enum ):
59+ class DriverMapping (StrEnum ):
6060 """Maps a given database driver to it's corresponding database engine."""
6161
6262 ASYNCPG = "POSTGRES"
You can’t perform that action at this time.
0 commit comments