Skip to content

Commit

Permalink
feat: make audio_type a cached_property (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jun 14, 2024
1 parent 0cfc0ea commit 50d22de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uiprotect/data/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class SmartDetectObjectType(str, ValuesEnumMixin, enum.Enum):
CAR = "car"
PET = "pet"

@property
@cached_property
def audio_type(self) -> SmartDetectAudioType | None:
return OBJECT_TO_AUDIO_MAP.get(self)

Expand Down

0 comments on commit 50d22de

Please sign in to comment.