diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-09 11:35:11 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-09 11:35:11 +0500 |
| commit | e4af28c4a398cd87378d3833b1d25db0f291ac9e (patch) | |
| tree | 5cbd3dbe7c08a11da0d99c1bc7409bc1bea4c63d /vk/last_seen.py | |
| parent | test: remove matplotlib workaround (diff) | |
| download | vk-scripts-e4af28c4a398cd87378d3833b1d25db0f291ac9e.tar.gz vk-scripts-e4af28c4a398cd87378d3833b1d25db0f291ac9e.zip | |
upgrade to StrEnum
Diffstat (limited to 'vk/last_seen.py')
| -rw-r--r-- | vk/last_seen.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vk/last_seen.py b/vk/last_seen.py index 757a5d7..225f107 100644 --- a/vk/last_seen.py +++ b/vk/last_seen.py @@ -6,7 +6,7 @@ from collections import OrderedDict from collections.abc import MutableMapping from datetime import datetime, timezone -from enum import Enum +from enum import auto, StrEnum from numbers import Integral, Real from .platform import Platform @@ -30,12 +30,9 @@ def _parse_platform(x): return Platform(x) -class LastSeenField(Enum): - TIME = "time" - PLATFORM = "platform" - - def __str__(self): - return self.value +class LastSeenField(StrEnum): + TIME = auto() + PLATFORM = auto() class LastSeen(MutableMapping): |
