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/user.py | |
parent | fix licensing notices (diff) | |
download | vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.tar.gz vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.zip |
fix Pylint warnings
Diffstat (limited to 'vk/user.py')
-rw-r--r-- | vk/user.py | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -9,30 +9,30 @@ from enum import Enum from .last_seen import LastSeen -def _parse_last_seen(x): - if isinstance(x, LastSeen): - return x - elif isinstance(x, Mapping): - return LastSeen.from_api_response(x) +def _parse_last_seen(src): + if isinstance(src, LastSeen): + return src + elif isinstance(src, Mapping): + return LastSeen.from_api_response(src) else: raise TypeError() -def _parse_bool(x): - if isinstance(x, str): - if str(True) == x: +def _parse_bool(src): + if isinstance(src, str): + if str(True) == src: return True - elif str(False) == x: + elif str(False) == src: return False else: raise ValueError() else: - return bool(x) + return bool(src) -def _parse_hidden(x): - return _parse_bool(x) +def _parse_hidden(src): + return _parse_bool(src) -def _parse_online_flag(x): - return _parse_bool(x) +def _parse_online_flag(src): + return _parse_bool(src) class UserField(Enum): UID = 'uid' @@ -56,8 +56,8 @@ class DeactivationReason(Enum): def __str__(self): return self.value -def _parse_deactivated(s): - return DeactivationReason(s) +def _parse_deactivated(src): + return DeactivationReason(src) class User(Hashable, MutableMapping): @staticmethod |