Skip to content

Commit 1daef9a

Browse files
committed
Use @unique to ensure and communicate enum uniqueness
1 parent a155c65 commit 1daef9a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/vws/include_target_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
Tools for managing ``CloudRecoService.query``'s ``include_target_data``.
33
"""
44

5-
from enum import StrEnum, auto
5+
from enum import StrEnum, auto, unique
66

77
from beartype import beartype
88

99

1010
@beartype
11+
@unique
1112
class CloudRecoIncludeTargetData(StrEnum):
1213
"""
1314
Options for the ``include_target_data`` parameter of

src/vws/reports.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import datetime
66
from dataclasses import dataclass
7-
from enum import Enum
7+
from enum import Enum, unique
88

99
from beartype import BeartypeConf, beartype
1010

@@ -33,6 +33,7 @@ class DatabaseSummaryReport:
3333

3434

3535
@beartype
36+
@unique
3637
class TargetStatuses(Enum):
3738
"""Constants representing VWS target statuses.
3839

0 commit comments

Comments
 (0)