diff options
| author | Egor Tensin <egor@tensin.name> | 2026-05-13 10:18:55 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-05-13 10:28:00 +0200 |
| commit | 084750a55fcc257236a2a9be6b945a131b226345 (patch) | |
| tree | 0f7b5d050f447ae90eae62ebbb4235ebf4da5f13 /vk | |
| parent | add .git-blame-ignore-revs (diff) | |
| download | vk-scripts-084750a55fcc257236a2a9be6b945a131b226345.tar.gz vk-scripts-084750a55fcc257236a2a9be6b945a131b226345.zip | |
vk.platform: update
This was very, very long overdue, if needed at all.
Diffstat (limited to 'vk')
| -rw-r--r-- | vk/platform.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/vk/platform.py b/vk/platform.py index c922983..5fb45fb 100644 --- a/vk/platform.py +++ b/vk/platform.py @@ -8,14 +8,14 @@ import re class Platform(Enum): + # https://dev.vk.com/en/reference/objects/user#last_seen MOBILE = 1 IPHONE = 2 IPAD = 3 ANDROID = 4 WINDOWS_PHONE = 5 - WINDOWS8 = 6 + WINDOWS10 = 6 WEB = 7 - VK_MOBILE = 8 @staticmethod def from_string(s): @@ -36,9 +36,6 @@ class Platform(Enum): def get_descr_text(self): s = _PLATFORM_DESCRIPTIONS[self] - if self == Platform.VK_MOBILE: - return s - s = s.replace('unrecognized', 'an unrecognized') return 'the ' + s def get_descr_text_capitalized(self): @@ -46,12 +43,11 @@ class Platform(Enum): _PLATFORM_DESCRIPTIONS = { - Platform.MOBILE: '"mobile" web version (or unrecognized mobile app)', + Platform.MOBILE: '"mobile" web version (or an unrecognized mobile app)', Platform.IPHONE: 'official iPhone app', Platform.IPAD: 'official iPad app', Platform.ANDROID: 'official Android app', Platform.WINDOWS_PHONE: 'official Windows Phone app', - Platform.WINDOWS8: 'official Windows 8 app', - Platform.WEB: 'web version (or unrecognized app)', - Platform.VK_MOBILE: 'VK Mobile', + Platform.WINDOWS10: 'official Windows 10 app', + Platform.WEB: 'web version (or an unrecognized app)', } |
