Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Jul 5, 2019
1 parent 400bc06 commit 3d89feb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
25 changes: 0 additions & 25 deletions synapse/storage/events_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 0 additions & 1 deletion tests/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d89feb

Please sign in to comment.