From 129cc8e6e916533ff51a5d65721cf904542a1c27 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 10 Oct 2016 10:12:01 +0300 Subject: fix Pylint warnings --- vk/platform.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'vk/platform.py') 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()) -- cgit v1.2.3