Skip to content

Commit

Permalink
Use @unique to ensure and communicate enum uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtheturtle committed Nov 4, 2024
1 parent a155c65 commit 1daef9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/vws/include_target_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Tools for managing ``CloudRecoService.query``'s ``include_target_data``.
"""

from enum import StrEnum, auto
from enum import StrEnum, auto, unique

from beartype import beartype


@beartype
@unique
class CloudRecoIncludeTargetData(StrEnum):
"""
Options for the ``include_target_data`` parameter of
Expand Down
3 changes: 2 additions & 1 deletion src/vws/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import datetime
from dataclasses import dataclass
from enum import Enum
from enum import Enum, unique

from beartype import BeartypeConf, beartype

Expand Down Expand Up @@ -33,6 +33,7 @@ class DatabaseSummaryReport:


@beartype
@unique
class TargetStatuses(Enum):
"""Constants representing VWS target statuses.
Expand Down

0 comments on commit 1daef9a

Please sign in to comment.