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/tracking/status_tracker.py | |
parent | fix licensing notices (diff) | |
download | vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.tar.gz vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.zip |
fix Pylint warnings
Diffstat (limited to '')
-rw-r--r-- | vk/tracking/status_tracker.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/vk/tracking/status_tracker.py b/vk/tracking/status_tracker.py index d47de39..d52af6a 100644 --- a/vk/tracking/status_tracker.py +++ b/vk/tracking/status_tracker.py @@ -27,21 +27,21 @@ class StatusTracker: self.add_status_update_handler(writer.on_status_update) self.add_connection_error_handler(writer.on_connection_error) - def add_initial_status_handler(self, fn): - self._assert_is_callback(fn) - self._on_initial_status.append(fn) + def add_initial_status_handler(self, handler): + self._assert_is_callback(handler) + self._on_initial_status.append(handler) - def add_status_update_handler(self, fn): - self._assert_is_callback(fn) - self._on_status_update.append(fn) + def add_status_update_handler(self, handler): + self._assert_is_callback(handler) + self._on_status_update.append(handler) - def add_connection_error_handler(self, fn): - self._assert_is_callback(fn) - self._on_connection_error.append(fn) + def add_connection_error_handler(self, handler): + self._assert_is_callback(handler) + self._on_connection_error.append(handler) @staticmethod - def _assert_is_callback(fn): - if not isinstance(fn, Callable): + def _assert_is_callback(handler): + if not isinstance(handler, Callable): raise TypeError() _USER_FIELDS = UserField.DOMAIN, UserField.ONLINE, UserField.LAST_SEEN, @@ -50,16 +50,16 @@ class StatusTracker: return {user.get_uid(): user for user in self._api.users_get(uids, self._USER_FIELDS)} def _notify_status(self, user): - for fn in self._on_initial_status: - fn(user) + for handler in self._on_initial_status: + handler(user) def _notify_status_update(self, user): - for fn in self._on_status_update: - fn(user) + for handler in self._on_status_update: + handler(user) def _notify_connection_error(self, e): - for fn in self._on_connection_error: - fn(e) + for handler in self._on_connection_error: + handler(e) def _query_initial_status(self, uids): while True: |