From e4af28c4a398cd87378d3833b1d25db0f291ac9e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 9 Oct 2026 11:35:11 +0500 Subject: upgrade to StrEnum --- vk/platform.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'vk/platform.py') 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]}" -- cgit v1.3