diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2018-03-03 15:40:10 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2018-03-03 15:40:10 +0300 |
commit | 96f1356aeafbdc026846cdbe1bcfcbbbd0ab3a7c (patch) | |
tree | 271e85f93792247725cd19f8064b65c7346acb68 /vk/tracking/db | |
parent | new platform, "VK Mobile" (diff) | |
download | vk-scripts-96f1356aeafbdc026846cdbe1bcfcbbbd0ab3a7c.tar.gz vk-scripts-96f1356aeafbdc026846cdbe1bcfcbbbd0ab3a7c.zip |
fix Pylint warnings
Diffstat (limited to 'vk/tracking/db')
-rw-r--r-- | vk/tracking/db/backend/log.py | 3 | ||||
-rw-r--r-- | vk/tracking/db/record.py | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vk/tracking/db/backend/log.py b/vk/tracking/db/backend/log.py index 1ea009b..814cabc 100644 --- a/vk/tracking/db/backend/log.py +++ b/vk/tracking/db/backend/log.py @@ -70,8 +70,7 @@ class Writer(meta.Writer): def _format_user(user): if user.has_last_name(): return '{} {}'.format(user.get_first_name(), user.get_last_name()) - else: - return '{}'.format(user.get_first_name()) + return '{}'.format(user.get_first_name()) @staticmethod def _format_user_is_online(user): diff --git a/vk/tracking/db/record.py b/vk/tracking/db/record.py index c03c3ca..dfd47c6 100644 --- a/vk/tracking/db/record.py +++ b/vk/tracking/db/record.py @@ -7,10 +7,11 @@ from collections import OrderedDict from collections.abc import MutableMapping from datetime import datetime -from .timestamp import Timestamp from vk.last_seen import LastSeen, LastSeenField from vk.user import User, UserField +from .timestamp import Timestamp + class Record(MutableMapping): FIELDS = ( UserField.UID, @@ -95,6 +96,6 @@ class Record(MutableMapping): self._update_user_field(user, field) else: assert False - if len(last_seen): + if last_seen: user.set_last_seen(last_seen) return user |