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/platform.py | |
| parent | test: remove matplotlib workaround (diff) | |
| download | vk-scripts-e4af28c4a398cd87378d3833b1d25db0f291ac9e.tar.gz vk-scripts-e4af28c4a398cd87378d3833b1d25db0f291ac9e.zip | |
upgrade to StrEnum
Diffstat (limited to 'vk/platform.py')
| -rw-r--r-- | vk/platform.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vk/platform.py b/vk/platform.py index d10d424..389e757 100644 --- a/vk/platform.py +++ b/vk/platform.py @@ -3,10 +3,10 @@ # For details, see https://github.com/egor-tensin/vk-scripts # Distributed under the MIT License. -from enum import Enum +from enum import IntEnum -class Platform(Enum): +class Platform(IntEnum): # https://dev.vk.com/en/reference/objects/user#last_seen MOBILE = 1 IPHONE = 2 @@ -20,9 +20,6 @@ class Platform(Enum): def from_string(s): return Platform(int(s)) - def __str__(self): - return str(self.value) - @property def descr(self): return f"the {_PLATFORM_DESCRIPTIONS[self]}" |
