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/tracking/status_tracker.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 'vk/tracking/status_tracker.py')
-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 d52af6a..d47de39 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, handler): - self._assert_is_callback(handler) - self._on_initial_status.append(handler) + def add_initial_status_handler(self, fn): + self._assert_is_callback(fn) + self._on_initial_status.append(fn) - def add_status_update_handler(self, handler): - self._assert_is_callback(handler) - self._on_status_update.append(handler) + def add_status_update_handler(self, fn): + self._assert_is_callback(fn) + self._on_status_update.append(fn) - def add_connection_error_handler(self, handler): - self._assert_is_callback(handler) - self._on_connection_error.append(handler) + def add_connection_error_handler(self, fn): + self._assert_is_callback(fn) + self._on_connection_error.append(fn) @staticmethod - def _assert_is_callback(handler): - if not isinstance(handler, Callable): + def _assert_is_callback(fn): + if not isinstance(fn, 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 handler in self._on_initial_status: - handler(user) + for fn in self._on_initial_status: + fn(user) def _notify_status_update(self, user): - for handler in self._on_status_update: - handler(user) + for fn in self._on_status_update: + fn(user) def _notify_connection_error(self, e): - for handler in self._on_connection_error: - handler(e) + for fn in self._on_connection_error: + fn(e) def _query_initial_status(self, uids): while True: |