diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-10 10:12:01 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-10 10:12:01 +0300 |
commit | 129cc8e6e916533ff51a5d65721cf904542a1c27 (patch) | |
tree | 67c85c362b756ffcc46f509b299319959c1ff2fa /vk/platform.py | |
parent | fix licensing notices (diff) | |
download | vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.tar.gz vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.zip |
fix Pylint warnings
Diffstat (limited to 'vk/platform.py')
-rw-r--r-- | vk/platform.py | 20 |
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()) |