From 3d89feb438d7754ba32ec48757814175a8fa9911 Mon Sep 17 00:00:00 2001 From: "Amber H. Brown" Date: Fri, 5 Jul 2019 23:34:24 +1000 Subject: [PATCH] linting --- synapse/storage/events_worker.py | 25 ------------------------- tests/unittest.py | 1 - 2 files changed, 26 deletions(-) diff --git a/synapse/storage/events_worker.py b/synapse/storage/events_worker.py index 9d7027b94392..5f493a666ffc 100644 --- a/synapse/storage/events_worker.py +++ b/synapse/storage/events_worker.py @@ -688,31 +688,6 @@ def get_current_state_event_counts(self, room_id): room_id, ) - def _get_current_state_event_counts_txn(self, txn, room_id): - """ - See get_current_state_event_counts. - """ - sql = "SELECT COUNT(*) FROM current_state_events WHERE room_id=?" - txn.execute(sql, (room_id,)) - row = txn.fetchone() - return row[0] if row else 0 - - def get_current_state_event_counts(self, room_id): - """ - Gets the current number of state events in a room. - - Args: - room_id (str) - - Returns: - Deferred[int] - """ - return self.runInteraction( - "get_current_state_event_counts", - self._get_current_state_event_counts_txn, - room_id, - ) - @defer.inlineCallbacks def get_room_complexity(self, room_id): """ diff --git a/tests/unittest.py b/tests/unittest.py index 1815c22d27c8..e6f90077e94a 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -24,7 +24,6 @@ from canonicaljson import json import twisted -import twisted.logger from twisted.internet.defer import Deferred, succeed from twisted.python.threadpool import ThreadPool from twisted.trial import unittest