Skip to content

Commit a7d74ac

Browse files
committed
Update Region as enum
1 parent 47ccb94 commit a7d74ac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

optimizely/project_config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
from .helpers import types
2323

2424
if version_info < (3, 8):
25-
from typing_extensions import Final, Literal
25+
from typing_extensions import Final
2626
else:
27-
from typing import Final, Literal # type: ignore
27+
from typing import Final # type: ignore
2828

2929
if TYPE_CHECKING:
3030
# prevent circular dependenacy by skipping import at runtime
@@ -41,8 +41,9 @@
4141

4242
EntityClass = TypeVar('EntityClass')
4343

44-
Region = Literal['US', 'EU']
45-
44+
class Region(str, enums):
45+
US = 'US'
46+
EU = 'EU'
4647

4748
class ProjectConfig:
4849
""" Representation of the Optimizely project config. """

0 commit comments

Comments
 (0)