diff options
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/stats.py | 5 | ||||
-rw-r--r-- | synapse/storage/stats.py | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/synapse/handlers/stats.py b/synapse/handlers/stats.py index f065d88a7d..2f7c108181 100644 --- a/synapse/handlers/stats.py +++ b/synapse/handlers/stats.py @@ -219,9 +219,8 @@ class StatsHandler(StateDeltasHandler): user_id = state_key if self.is_mine_id(user_id): # this accounts for transitions like leave → ban and so on. - has_changed_joinedness = ( - (prev_membership == Membership.JOIN) != - (membership == Membership.JOIN) + has_changed_joinedness = (prev_membership == Membership.JOIN) != ( + membership == Membership.JOIN ) if has_changed_joinedness: diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py index 6832ec6b7f..f86e9bd269 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py @@ -15,13 +15,10 @@ # limitations under the License. import logging -from threading import Lock - -from twisted.internet import defer from itertools import chain +from threading import Lock from synapse.storage.state_deltas import StateDeltasStore -from synapse.storage.state_deltas import StateDeltasStore from synapse.util.caches.descriptors import cached logger = logging.getLogger(__name__) |