diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-11 21:12:40 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-11 21:12:40 +0300 |
commit | f53205cdf147185e7001aaf9b0d724abc14dad7f (patch) | |
tree | a924f1492c42fe9e2362e2b52cfdea03a7f5539d /vk/platform.py | |
parent | README update (diff) | |
download | vk-scripts-f53205cdf147185e7001aaf9b0d724abc14dad7f.tar.gz vk-scripts-f53205cdf147185e7001aaf9b0d724abc14dad7f.zip |
revert most of the recent Pylint fixes
I know better how to name my things.
Diffstat (limited to '')
-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 26f20dc..fa1e665 100644 --- a/vk/platform.py +++ b/vk/platform.py @@ -16,26 +16,26 @@ class Platform(Enum): WEB = 7 @staticmethod - def from_string(src): - return Platform(int(src)) + def from_string(s): + return Platform(int(s)) def __str__(self): return str(self.value) @staticmethod - 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 _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 get_descr_header(self): return self._uppercase_first_letter(_PLATFORM_DESCRIPTIONS[self]) def get_descr_text(self): - descr = _PLATFORM_DESCRIPTIONS[self] - descr = descr.replace('unrecognized', 'an unrecognized') - return 'the ' + descr + s = _PLATFORM_DESCRIPTIONS[self] + s = s.replace('unrecognized', 'an unrecognized') + return 'the ' + s def get_descr_text_capitalized(self): return self._uppercase_first_letter(self.get_descr_text()) |