aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/platform.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vk/platform.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/vk/platform.py b/vk/platform.py
index fa1e665..26f20dc 100644
--- a/vk/platform.py
+++ b/vk/platform.py
@@ -16,26 +16,26 @@ class Platform(Enum):
WEB = 7
@staticmethod
- def from_string(s):
- return Platform(int(s))
+ def from_string(src):
+ return Platform(int(src))
def __str__(self):
return str(self.value)
@staticmethod
- def _uppercase_first_letter(s):
- m = re.search(r'\w', s)
- if m is None:
- return s
- return s[:m.start()] + m.group().upper() + s[m.end():]
+ def _uppercase_first_letter(text):
+ match = re.search(r'\w', text)
+ if match is None:
+ return text
+ return text[:match.start()] + match.group().upper() + text[match.end():]
def get_descr_header(self):
return self._uppercase_first_letter(_PLATFORM_DESCRIPTIONS[self])
def get_descr_text(self):
- s = _PLATFORM_DESCRIPTIONS[self]
- s = s.replace('unrecognized', 'an unrecognized')
- return 'the ' + s
+ descr = _PLATFORM_DESCRIPTIONS[self]
+ descr = descr.replace('unrecognized', 'an unrecognized')
+ return 'the ' + descr
def get_descr_text_capitalized(self):
return self._uppercase_first_letter(self.get_descr_text())