Use cached_property instead of stacked property + cache (#67515)

This commit is contained in:
Marc Mueller
2022-03-03 23:59:48 +01:00
committed by GitHub
parent 9356bf1a8e
commit a55d20f164

View File

@@ -680,8 +680,7 @@ class DmsDeviceSource:
"""Make an identifier for BrowseMediaSource."""
return f"{self.source_id}/{action}{object_id}"
@property # type: ignore
@functools.cache
@functools.cached_property
def _sort_criteria(self) -> list[str]:
"""Return criteria to be used for sorting results.